Class YieldCallback<K>
- java.lang.Object
-
- org.apache.accumulo.core.iterators.YieldCallback<K>
-
public class YieldCallback<K> extends Object
This callback handles the state of yielding within an iterator
-
-
Constructor Summary
Constructors Constructor Description YieldCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description K
getPositionAndReset()
Called by the client to get the yield position used as the start key (non-inclusive) of the range in a subsequent seek call when the iterator is rebuilt.boolean
hasYielded()
Called by the client to see if the iterator yieldedvoid
yield(K key)
Called by the iterator when a next or seek call yields control.
-
-
-
Method Detail
-
yield
public void yield(K key)
Called by the iterator when a next or seek call yields control.- Parameters:
key
- the key position at which the iterator yielded.
-
hasYielded
public boolean hasYielded()
Called by the client to see if the iterator yielded- Returns:
- true if iterator yielded control
-
getPositionAndReset
public K getPositionAndReset()
Called by the client to get the yield position used as the start key (non-inclusive) of the range in a subsequent seek call when the iterator is rebuilt. This will also reset the state returned by hasYielded.- Returns:
K
The key position
-
-