Package fr.gouv.vitam.common.iterables
Class BulkBufferingEntryIterator<T>
- java.lang.Object
-
- fr.gouv.vitam.common.iterables.BulkBufferingEntryIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
- Direct Known Subclasses:
OfferLogIterator
,StorageClientOfferLogIterator
public abstract class BulkBufferingEntryIterator<T> extends java.lang.Object implements java.util.Iterator<T>
Iterator that loads data in chunks, and return single entries
-
-
Constructor Summary
Constructors Constructor Description BulkBufferingEntryIterator(int bufferSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
protected abstract java.util.List<T>
loadNextChunk(int chunkSize)
Loads a chunk of the specified size.T
next()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
loadNextChunk
protected abstract java.util.List<T> loadNextChunk(int chunkSize)
Loads a chunk of the specified size.- Returns:
- List with next entries to process. Returned list must be the size specified, unless end of data is reached.
-
-