Class AbstractScanQueryIterator<K,V,R>
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
-
- org.apache.ignite.internal.util.GridCloseableIteratorAdapter<R>
-
- org.apache.ignite.internal.processors.cache.query.AbstractScanQueryIterator<K,V,R>
-
- All Implemented Interfaces:
Serializable,AutoCloseable,Iterable<R>,Iterator<R>,GridSerializableIterator<R>,GridCloseableIterator<R>,GridIterator<R>,IgniteSpiCloseableIterator<R>
- Direct Known Subclasses:
ScanQueryIterator
public abstract class AbstractScanQueryIterator<K,V,R> extends GridCloseableIteratorAdapter<R>
Abstract scan query iterator.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected GridCacheContext<K,V>cctxprotected booleanstatsEnabled
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractScanQueryIterator(GridCacheContext<K,V> cctx, CacheQuery<R> qry, IgniteClosure<javax.cache.Cache.Entry<K,V>,R> transform, boolean locNode)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Radvance()Moves the iterator to the next cache entry.GridCacheContext<K,V>cacheContext()static voidcloseFilter(IgniteBiPredicate<?,?> filter)@Nullable IgniteBiPredicate<K,V>filter()RfilterAndTransform(KeyCacheObject key, CacheObject val, long start)Perform filtering and transformation of key-value pair.booleankeepBinary()booleanlocal()protected voidonClose()Invoked on iterator close.protected booleanonHasNext()protected RonNext()UUIDsubjectId()StringtaskName()IgniteClosure<javax.cache.Cache.Entry<K,V>,R>transformer()-
Methods inherited from class org.apache.ignite.internal.util.GridCloseableIteratorAdapter
checkClosed, close, hasNextX, isClosed, nextX, onRemove, removeX
-
Methods inherited from class org.apache.ignite.internal.util.lang.GridIteratorAdapter
hasNext, iterator, next, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Field Detail
-
statsEnabled
protected final boolean statsEnabled
-
cctx
protected final GridCacheContext<K,V> cctx
-
-
Constructor Detail
-
AbstractScanQueryIterator
protected AbstractScanQueryIterator(GridCacheContext<K,V> cctx, CacheQuery<R> qry, IgniteClosure<javax.cache.Cache.Entry<K,V>,R> transform, boolean locNode) throws IgniteCheckedException
- Parameters:
cctx- Grid cache context.qry- Query adapter.transform- Optional transformer.locNode- Flag for local node iterator.- Throws:
IgniteCheckedException- If failed.
-
-
Method Detail
-
onNext
protected R onNext()
- Specified by:
onNextin classGridCloseableIteratorAdapter<R>- Returns:
- Next element.
-
onHasNext
protected boolean onHasNext()
- Specified by:
onHasNextin classGridCloseableIteratorAdapter<R>- Returns:
Trueif iterator has next element.
-
onClose
protected void onClose()
Invoked on iterator close.- Overrides:
onClosein classGridCloseableIteratorAdapter<R>
-
advance
protected abstract R advance()
Moves the iterator to the next cache entry.
-
filterAndTransform
public R filterAndTransform(KeyCacheObject key, CacheObject val, long start)
Perform filtering and transformation of key-value pair.- Returns:
- Object to return to the user, or
nullif filtered.
-
filter
@Nullable public @Nullable IgniteBiPredicate<K,V> filter()
-
closeFilter
public static void closeFilter(IgniteBiPredicate<?,?> filter)
-
transformer
public IgniteClosure<javax.cache.Cache.Entry<K,V>,R> transformer()
-
local
public boolean local()
-
keepBinary
public boolean keepBinary()
-
subjectId
public UUID subjectId()
-
taskName
public String taskName()
-
cacheContext
public GridCacheContext<K,V> cacheContext()
-
-