Package one.microstream.storage.types
Interface StorageDataFileItemIterator.BufferProvider
- All Known Implementing Classes:
StorageDataConverterTypeBinaryToCsv.UTF8,StorageDataFileItemIterator.BufferProvider.ConstantSizedBufferProvider
- Enclosing interface:
- StorageDataFileItemIterator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface StorageDataFileItemIterator.BufferProvider
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStorageDataFileItemIterator.BufferProvider.ConstantSizedBufferProviderSimple implementation that provides always the sameByteBufferinstance with a fixed size. -
Method Summary
Modifier and Type Method Description default voidcleanUp()static StorageDataFileItemIterator.BufferProviderNew()static StorageDataFileItemIterator.BufferProviderNewConstantSized(int bufferCapacity)ByteBufferprovideBuffer(ByteBuffer byteBuffer, long nextEntityLength)The passed and returned byte buffer instances are guaranteed to be direct bytebuffer.default ByteBufferprovideInitialBuffer()
-
Method Details
-
provideInitialBuffer
-
provideBuffer
The passed and returned byte buffer instances are guaranteed to be direct bytebuffer. This has to be ensured via contract instead of proper typing because of the lack of competent typing in the JDK. All byte buffer instances passed to this method are guaranteed to have been created by it. SeeprovideInitialBuffer().- Parameters:
byteBuffer- the direct byte buffer used so far.nextEntityLength- the length of the next entity to be read to the buffer.- Returns:
- a byte buffer of apriorate size to hold the next entity's data to be processed sufficiently.
-
cleanUp
default void cleanUp() -
New
-
NewConstantSized
-