Class BinaryLoadItem
- java.lang.Object
-
- one.microstream.persistence.binary.types.Binary
-
- one.microstream.persistence.binary.types.BinaryLoadItem
-
- All Implemented Interfaces:
Chunk
- Direct Known Subclasses:
BinaryLoadItemByteReversing
public class BinaryLoadItem extends Binary
-
-
Constructor Summary
Constructors Constructor Description BinaryLoadItem()
-
Method Summary
Modifier and Type Method Description ByteBuffer[]
buffers()
Binary
channelChunk(int channelIndex)
int
channelCount()
void
clear()
boolean
hasData()
Some binary entries serve as a skip entry, so that an entry for a particular object id already exists.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)
long
storeEntityHeader(long entityContentLength, long entityTypeId, long entityObjectId)
Writes the header (etc...).String
toString()
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
-
channelChunk
public final Binary channelChunk(int channelIndex)
- Specified by:
channelChunk
in classBinary
-
channelCount
public final int channelCount()
- Specified by:
channelCount
in classBinary
-
iterateEntityData
public void iterateEntityData(BinaryEntityDataReader reader)
- Specified by:
iterateEntityData
in classBinary
-
iterateChannelChunks
public void iterateChannelChunks(Consumer<? super Binary> logic)
- Specified by:
iterateChannelChunks
in classBinary
-
hasData
public final boolean hasData()
Some binary entries serve as a skip entry, so that an entry for a particular object id already exists. Naturally, those entries don't have data then, which must be checked (be checkable) later on.- Returns:
- whether this instances carries (actually "knows") binary build data or not.
-
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
-
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
-
buffers
public final ByteBuffer[] buffers()
-
clear
public final void clear()
-
isEmpty
public final boolean isEmpty()
-
totalLength
public final long totalLength()
-
-