Attempts to cast this stealer into a precise stealer.
Attempts to cast this stealer into a precise stealer.
Optional.
Returns an estimate on the number of remaining elements.
A shortcut method that checks if the stealer is in the available state.
A shortcut method that checks if the stealer is in the available state.
Attempts to push the stealer to the Completed state.
Attempts to push the stealer to the Completed state.
Only changes the state if the stealer was in the AvailableOrOwned state, otherwise does nothing.
Note: after having called this operation, the node will either be stolen or completed.
true if node ends in the Completed state, false if it ends in the StolenOrExpanded state
Attempts to push the stealer to the Stolen state.
Attempts to push the stealer to the Stolen state.
Only changes the state if the stealer was in the AvailableOrOwned state, otherwise does nothing.
Note: after having called this operation, the node will either be stolen or completed.
false if node ends in the Completed state, true if it ends in the StolenOrExpanded state
Minimum stealing threshold above which this stealer can be stolen and split.
Minimum stealing threshold above which this stealer can be stolen and split.
Note: splitting and stealing still work if there are less elements, but the scheduler will not split such stealers.
Commits to processing a block of elements by using next and hasNext.
Commits to processing a block of elements by using next and hasNext.
Once hasNext has returned false, nextBatch can be called again.
approximate number of elements to commit to processing
-1 if the stealer is not in the AvailableOrOwned state, otherwise
an approximation on the number of elements that calls to next will return.
Can only be called on stealers that are in the stolen state.
Stealer state can be AvailableOrOwned, Completed or StolenOrExpanded.