public class StaticParIterator<E> extends ParIteratorAbstract<E>
ParIterator.Schedule| Modifier and Type | Field and Description | 
|---|---|
protected java.util.List<java.util.List<E>> | 
chunks  | 
protected java.util.List<E> | 
data  | 
protected TLocal<java.util.Iterator<java.util.List<E>>> | 
localChunkIterator  | 
protected TLocal<java.util.List<java.util.List<E>>> | 
localChunks  | 
protected TLocal<java.util.Iterator<E>> | 
localIterator  | 
chunkSize, collection, exceptions, flags, ignoreBarrier, latch, numOfThreads, reclaimedElements, threadIDDEFAULT_CHUNKSIZE| Constructor and Description | 
|---|
StaticParIterator(java.util.Collection<E> collection,
                 int chunkSize,
                 int numOfThreads,
                 boolean ignoreBarrier)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
forEachRemaining(java.util.function.Consumer<? super E> action)  | 
protected java.util.List<E> | 
formatData(java.util.Collection<E> collection)  | 
boolean | 
hasNext()
Checks to see if any elements remain for the current thread. 
 | 
boolean | 
localBreak()
Attempts to excuse the current thread from continuing to iterate (and re-distribute all unprocessed elements to 
 the other threads). 
 | 
E | 
next()
Returns an element for the current thread to process. 
 | 
void | 
reset()
Reset ParIterator for reuse. 
 | 
allOtherThreadsHaveLocalBreaked, getAllExceptions, getID, globalBreak, register, register, removeprotected final java.util.List<E> data
protected final java.util.List<java.util.List<E>> chunks
public StaticParIterator(java.util.Collection<E> collection, int chunkSize, int numOfThreads, boolean ignoreBarrier)
public boolean hasNext()
ParIteratortrue is returned 
 and the current thread must follow up with a binding call to next(). A thread must continue to obtain elements 
 in this fashion until this method returns false. 
 
 Note that this method involves an implicit barrier for the last call to hasNext() in order to ensure all threads 
 finish at the same time.
true if at least one element has been reserved for the calling thread (in which case it must follow up 
                        with a call to next()).
 false otherwise (in such a case, the calling thread blocks until all the other threads have completed 
 their iterations).ParIterator.next()public E next()
ParIteratorhasNext() (and received true).
  
 Note that calls to hasNext() (that return true) only allow for one corresponding and binding call to 
 hasNext(). Therefore, multiple calls to hasNext() have no effect until the corresponding 
 call to next() takes place.
ParIterator.hasNext()public boolean localBreak()
ParIterator
 Therefore, (as opposed to globalBreak()) this method guarantees that even if all threads attempt to 
 localBreak(), at least one will fail and is left to traverse the remaining elements. Note that in many 
 cases, calling localBreak() will break the original scheduling policy.
true if the attempt is successful, false otherwise.ParIterator.globalBreak()public void reset()
ParIteratorreset in interface ParIterator<E>reset in class ParIteratorAbstract<E>public void forEachRemaining(java.util.function.Consumer<? super E> action)