Class YieldingIterator
- java.lang.Object
-
- org.apache.accumulo.core.iterators.WrappingIterator
-
- org.apache.accumulo.test.functional.YieldingIterator
-
- All Implemented Interfaces:
SortedKeyValueIterator<Key,Value>
,YieldingKeyValueIterator<Key,Value>
public class YieldingIterator extends WrappingIterator implements YieldingKeyValueIterator<Key,Value>
This iterator which implements yielding will yield after every other next and every other seek call.
-
-
Constructor Summary
Constructors Constructor Description YieldingIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedKeyValueIterator<Key,Value>
deepCopy(IteratorEnvironment env)
void
enableYielding(YieldCallback<Key> yield)
Value
getTopValue()
The top value will encode the current state of the yields, seeks, and rebuilds for use by the YieldScannersIT tests.boolean
hasTop()
void
next()
void
seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
-
Methods inherited from class org.apache.accumulo.core.iterators.WrappingIterator
getSource, getTopKey, init, setSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.iterators.SortedKeyValueIterator
getTopKey, init
-
-
-
-
Method Detail
-
deepCopy
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
- Specified by:
deepCopy
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
deepCopy
in classWrappingIterator
-
hasTop
public boolean hasTop()
- Specified by:
hasTop
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
hasTop
in classWrappingIterator
-
next
public void next() throws IOException
- Specified by:
next
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
next
in classWrappingIterator
- Throws:
IOException
-
getTopValue
public Value getTopValue()
The top value will encode the current state of the yields, seeks, and rebuilds for use by the YieldScannersIT tests.- Specified by:
getTopValue
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
getTopValue
in classWrappingIterator
- Returns:
- a top value of the form {yieldNexts},{yieldSeeks},{rebuilds}
-
seek
public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException
- Specified by:
seek
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
seek
in classWrappingIterator
- Throws:
IOException
-
enableYielding
public void enableYielding(YieldCallback<Key> yield)
- Specified by:
enableYielding
in interfaceYieldingKeyValueIterator<Key,Value>
-
-