Class BulkBufferingEntryIterator<T>

java.lang.Object
fr.gouv.vitam.common.iterables.BulkBufferingEntryIterator<T>
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
OfferLogIterator, StorageClientOfferLogIterator

public abstract class BulkBufferingEntryIterator<T> extends Object implements Iterator<T>
Iterator that loads data in chunks, and return single entries
  • Constructor Details

    • BulkBufferingEntryIterator

      public BulkBufferingEntryIterator(int bufferSize)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • loadNextChunk

      protected abstract 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.
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>