Package wt.impact
Class AbstractWTEntryChunkedIterator<E extends WTKeyedMap.WTEntry>
java.lang.Object
wt.impact.AbstractWTEntryChunkedIterator<E>
- All Implemented Interfaces:
AutoCloseable,Iterator<E>
- Direct Known Subclasses:
WTEntryChunkedIterator,WTValuedEntryChunkedIterator
public class AbstractWTEntryChunkedIterator<E extends WTKeyedMap.WTEntry>
extends Object
implements Iterator<E>, AutoCloseable
WTEntry and WTValuedEntry set iterator that inflates and deflates references in chunks.
This iterator keeps memory usage low when iterating over large, deflated maps.
This is an abstract implementation used by WTEntryChunkedIterator and WTValuedEntryChunkedIterator.
This iterator can only be used in the method server.
Supported API: true
Extendable: false
- See Also:
-
WTEntryChunkedIteratorWTKeyedMap.WTEntryWTValuedEntryChunkedIteratorWTEntry#WTValuedEntry
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractWTEntryChunkedIterator(WTKeyedMap map, int chunkSize, Class<? extends Persistable> keyFilter, boolean includeSubclasses) Construct a new WTEntryChunkedIterator for map entries with filtered keys. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
AbstractWTEntryChunkedIterator
public AbstractWTEntryChunkedIterator(WTKeyedMap map, int chunkSize, Class<? extends Persistable> keyFilter, boolean includeSubclasses) Construct a new WTEntryChunkedIterator for map entries with filtered keys.This iterator can only be used in the method server.
Supported API: true- Parameters:
map- WTKeyedMap with deflated key references.chunkSize- Number of entries that are inflated in a chunk.keyFilter- Key class filter.includeSubclasses- True to iterated over the key filter objects and all of its sub-classes, or false to iterated over only the key filter objects.
-
-
Method Details
-
close
public void close()Deflate references and clear chunk collections. Called automatically if iterator is a resource in a try-with-resources block.
Supported API: true- Specified by:
closein interfaceAutoCloseable
-
hasNext
public boolean hasNext()
Supported API: true- Specified by:
hasNextin interfaceIterator<E extends WTKeyedMap.WTEntry>- Throws:
WTRuntimeException
-
next
Returns the next map entry object. References will be inflated and deflated in chunks within next() calls.
Supported API: true- Specified by:
nextin interfaceIterator<E extends WTKeyedMap.WTEntry>- Throws:
NoSuchElementException
-