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 class
StorageDataFileItemIterator.BufferProvider.ConstantSizedBufferProvider
Simple implementation that provides always the sameByteBuffer
instance with a fixed size. -
Method Summary
Modifier and Type Method Description default void
cleanUp()
static StorageDataFileItemIterator.BufferProvider
New()
static StorageDataFileItemIterator.BufferProvider
NewConstantSized(int bufferCapacity)
ByteBuffer
provideBuffer(ByteBuffer byteBuffer, long nextEntityLength)
The passed and returned byte buffer instances are guaranteed to be direct bytebuffer.default ByteBuffer
provideInitialBuffer()
-
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
-