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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    Called by the client to see if the iterator yielded
    void
    yield(K key)
    Called by the iterator when a next or seek call yields control.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • YieldCallback

      public YieldCallback()
  • Method Details

    • 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