public interface ChunkDataStream
This avoid loading all chunks into memory at once, reducing the memory footprint and persistence operations.
The chunks are loaded individually in
sequence. Strong references to the chunks represented by
DataContainers should be avoided AT ALL COSTS. The
data represented is a copy and therefore shouldn't be considered synchronized
to live data.
This is a data stream from the chunk storage system and should be used in an asynchronous thread from the main thread.
|Modifier and Type||Method and Description|
Gets the number of chunks available to read as
Checks if there is an available chunk to represent.
Resets this stream to read from the beginning of the collection of chunks.
@Nullable DataContainer next()
Chunkrepresented by a read only
This method BLOCKS the thread until the next available data has been read.
This may not return a
DataContainer in the event there is no
chunk data available to read.