Class ChunksWrapper
- java.lang.Object
-
- one.microstream.persistence.binary.types.Binary
-
- one.microstream.persistence.binary.types.ChunksWrapper
-
- All Implemented Interfaces:
Chunk
- Direct Known Subclasses:
ChunksWrapperByteReversing
public class ChunksWrapper extends Binary
-
-
Constructor Summary
Constructors Constructor Description ChunksWrapper()
-
Method Summary
Modifier and Type Method Description ByteBuffer[]
buffers()
Binary
channelChunk(int channelIndex)
int
channelCount()
void
clear()
boolean
isEmpty()
void
iterateChannelChunks(Consumer<? super Binary> logic)
void
iterateEntityData(BinaryEntityDataReader reader)
long
loadItemEntityAddress()
long
loadItemEntityContentAddress()
void
modifyLoadItem(long entityContentAddress, long entityTotalLength, long entityTypeId, long entityObjectId)
static ChunksWrapper
New(ByteBuffer... chunkDirectBuffers)
long
storeEntityHeader(long entityContentLength, long entityTypeId, long entityObjectId)
Writes the header (etc...).long
totalLength()
-
Methods inherited from class one.microstream.persistence.binary.types.Binary
binaryListElementsAddress, binaryListMaximumLength, binaryListMinimumLength, buildArray_byte, buildArray_char, buildArray_char, buildBoolean, buildByte, buildCharacter, buildDouble, buildFloat, buildInteger, buildLong, buildShort, buildString, buildStrings, calculateBinaryLengthChars, calculateReferenceListTotalBinaryLength, calculateStringListContentBinaryLength, collectElementsIntoArray, collectKeyValueReferences, collectListObjectReferences, collectObjectReferences, createArray_boolean, createArray_byte, createArray_char, createArray_char, createArray_double, createArray_float, createArray_int, createArray_long, createArray_short, entityAddressFromContentAddress, entityContentAddress, entityContentLength, entityHeaderLength, entityTotalLength, get_boolean, get_byte, get_char, get_double, get_float, get_int, get_long, get_short, getBinaryListElementCountRawValue, getBinaryListElementCountUnvalidating, getBinaryListElementCountValidating, getBinaryListTotalByteLength, getBinaryListTotalByteLengthRawValue, getBuildItemContentLength, getBuildItemObjectId, getBuildItemTypeId, getEntityBoundAddress, getEntityLength, getEntityLengthRawValue, getEntityObjectId, getEntityObjectIdRawValue, getEntityTypeId, getEntityTypeIdRawValue, getHelper, getListElementCount, getListElementCountKeyValue, getListElementCountReferences, getLoadItemAvailableContentLength, getSizedArrayElementCount, getSizedArrayElementsAddress, getSizedArrayLength, isSwitchedByteOrder, isValidEntityLength, isValidGapLength, iterateKeyValueEntriesReferences, iterateListElementReferences, iterateListStructureReferenceRange, iterateReferenceRange, iterateReferenceRangeUnvalidated, iterateSizedArrayElementReferences, keyValueBinaryLength, keyValueReferenceCount, lengthLength, objectIdByteLength, read_bytes, read_longs, readCharsDirect, referenceBinaryLength, registerHelper, store_boolean, store_byte, store_char, store_double, store_float, store_int, store_long, store_short, storeArray_boolean, storeArray_byte, storeArray_char, storeArray_double, storeArray_float, storeArray_int, storeArray_long, storeArray_short, storeBoolean, storeByte, storeCharacter, storeCharsAsList, storeCharsAsList, storeCharsDirect, storeDouble, storeFixedSize, storeFloat, storeInteger, storeIterableAsList, storeIterableContentAsList, storeKeyValuesAsEntries, storeKeyValuesAsEntries, storeListHeader, storeLong, storeMapEntrySet, storeReferences, storeReferences, storeRoots, storeShort, storeSizedArray, storeSizedArray, storeStateless, storeStringsAsList, storeStringsAsList, storeStringValue, storeStringValue, storeStringValue, toBinaryListContentByteLength, toBinaryListElementsAddress, toBinaryListTotalByteLength, updateArray_boolean, updateArray_byte, updateArray_char, updateArray_double, updateArray_float, updateArray_int, updateArray_long, updateArray_short, updateArrayObjectReferences, updateFixedSize, updateSizedArrayObjectReferences, validateArrayLength
-
-
-
-
Method Detail
-
New
public static ChunksWrapper New(ByteBuffer... chunkDirectBuffers)
-
iterateEntityData
public void iterateEntityData(BinaryEntityDataReader reader)
- Specified by:
iterateEntityData
in classBinary
-
iterateChannelChunks
public void iterateChannelChunks(Consumer<? super Binary> logic)
- Specified by:
iterateChannelChunks
in classBinary
-
channelChunk
public final Binary channelChunk(int channelIndex)
- Specified by:
channelChunk
in classBinary
-
channelCount
public final int channelCount()
- Specified by:
channelCount
in classBinary
-
isEmpty
public final boolean isEmpty()
-
totalLength
public final long totalLength()
-
buffers
public final ByteBuffer[] buffers()
-
storeEntityHeader
public final long storeEntityHeader(long entityContentLength, long entityTypeId, long entityObjectId)
Description copied from class:Binary
Writes the header (etc...).Returns a memory address that is guaranteed to be safe for writing len bytes. Writing any more bytes will lead to unpredictable results, from (most likely) destroying the byte stream's consistency up to crashing the VM immediately or at some point in the future.
DO NOT WRITE MORE THEN len BYTES TO THE RETURNED ADDRESS!
- Specified by:
storeEntityHeader
in classBinary
-
loadItemEntityContentAddress
public final long loadItemEntityContentAddress()
- Specified by:
loadItemEntityContentAddress
in classBinary
-
loadItemEntityAddress
public final long loadItemEntityAddress()
- Specified by:
loadItemEntityAddress
in classBinary
-
modifyLoadItem
public final void modifyLoadItem(long entityContentAddress, long entityTotalLength, long entityTypeId, long entityObjectId)
- Specified by:
modifyLoadItem
in classBinary
-
clear
public final void clear()
-
-