Class Binary
- java.lang.Object
-
- one.microstream.persistence.binary.types.Binary
-
- All Implemented Interfaces:
Chunk
- Direct Known Subclasses:
BinaryLoadItem
,ChunksBuffer
,ChunksWrapper
public abstract class Binary extends Object implements Chunk
-
-
Constructor Summary
Constructors Constructor Description Binary()
-
Method Summary
Modifier and Type Method Description static long
binaryListMaximumLength()
static long
binaryListMinimumLength()
abstract ByteBuffer[]
buffers()
boolean[]
build_booleans()
boolean[]
build_booleans(long listOffset)
byte[]
build_bytes()
byte[]
build_bytes(long listOffset)
char[]
build_chars()
char[]
build_chars(long listOffset)
double[]
build_doubles()
double[]
build_doubles(long listOffset)
float[]
build_floats()
float[]
build_floats(long listOffset)
int[]
build_ints()
int[]
build_ints(long listOffset)
long[]
build_longs()
long[]
build_longs(long listOffset)
short[]
build_shorts()
short[]
build_shorts(long listOffset)
Boolean
buildBoolean()
Boolean
buildBoolean(long offset)
Byte
buildByte()
Byte
buildByte(long offset)
Character
buildCharacter()
Character
buildCharacter(long offset)
Double
buildDouble()
Double
buildDouble(long offset)
Float
buildFloat()
Float
buildFloat(long offset)
Integer
buildInteger()
Integer
buildInteger(long offset)
Long
buildLong()
Long
buildLong(long offset)
Object
buildPrimitiveWrapper(Class<?> primitiveValueType)
Object
buildPrimitiveWrapper(Class<?> primitiveValueType, long offset)
<T extends XAddingMap<String,Long>>
TbuildRootMapping(T mapping)
Short
buildShort()
Short
buildShort(long offset)
String
buildString()
String[]
buildStrings(long stringsListOffset)
static long
calculateBinaryLengthChars(long count)
static long
calculateReferenceListTotalBinaryLength(long count)
static long
calculateStringListContentBinaryLength(String[] strings)
abstract Binary
channelChunk(int channelIndex)
abstract int
channelCount()
void
collectElementsIntoArray(long binaryOffset, PersistenceObjectIdResolver oidResolver, Object[] target)
int
collectKeyValueReferences(long binaryOffset, int length, PersistenceObjectIdResolver oidResolver, BiConsumer<Object,Object> collector)
int
collectListObjectReferences(long binaryOffset, PersistenceObjectIdResolver oidResolver, Consumer<Object> collector)
void
collectObjectReferences(long binaryOffset, int length, PersistenceObjectIdResolver oidResolver, Consumer<Object> collector)
void
copyMemory(ByteBuffer directByteBuffer, long offset, BinaryValueSetter[] setters, long[] targetOffsets)
boolean[]
create_booleans()
boolean[]
create_booleans(long listOffset)
byte[]
create_bytes()
byte[]
create_bytes(long listOffset)
char[]
create_chars()
char[]
create_chars(long listOffset)
double[]
create_doubles()
double[]
create_doubles(long listOffset)
float[]
create_floats()
float[]
create_floats(long listOffset)
int[]
create_ints()
int[]
create_ints(long listOffset)
long[]
create_longs()
long[]
create_longs(long listOffset)
short[]
create_shorts()
short[]
create_shorts(long listOffset)
static long
entityContentLength(long entityTotalLength)
static int
entityHeaderLength()
static long
entityTotalLength(long entityContentLength)
long
getBinaryListElementCountUnvalidating(long listOffset)
long
getBinaryListElementCountValidating(long listOffset, long elementLength)
long
getBinaryListTotalByteLength(long listOffset)
long
getBuildItemContentLength()
long
getBuildItemObjectId()
long
getBuildItemTypeId()
long
getEntityLength()
static long
getEntityLengthRawValue(long entityAddress)
long
getEntityObjectId()
static long
getEntityObjectIdRawValue(long entityAddress)
long
getEntityTypeId()
static long
getEntityTypeIdRawValue(long entityAddress)
Object
getHelper(Object key)
Helper instances can be used as temporary additional state for the duration of the building process.long
getListElementCount(long listStartOffset, int elementLength)
long
getListElementCountKeyValue(long listStartOffset)
long
getListElementCountReferences(long listStartOffset)
long
getLoadItemAvailableContentLength()
int
getSizedArrayElementCount(long headerOffset)
long
getSizedArrayElementsAddress(long headerOffset)
int
getSizedArrayLength(long sizedArrayOffset)
boolean
isSwitchedByteOrder()
static boolean
isValidEntityLength(long entityLength)
static boolean
isValidGapLength(long gapLength)
abstract void
iterateChannelChunks(Consumer<? super Binary> logic)
abstract void
iterateEntityData(BinaryEntityDataReader reader)
void
iterateKeyValueEntriesReferences(long listOffset, PersistenceObjectIdAcceptor iterator)
void
iterateListElementReferences(long listOffset, PersistenceObjectIdAcceptor iterator)
long
iterateListStructureElements(long listOffset, BinaryElementReader reader)
Iterates over all elements of a binary list.void
iterateListStructureReferenceRange(long listOffset, int referencesPerElement, PersistenceObjectIdAcceptor iterator)
void
iterateReferenceRange(long startOffset, long boundOffset, PersistenceObjectIdAcceptor iterator)
void
iterateReferenceRangeUnvalidated(long startOffset, long boundOffset, PersistenceObjectIdAcceptor iterator)
abstract long
iterateReferences(BinaryReferenceTraverser[] traversers, PersistenceObjectIdAcceptor acceptor)
void
iterateSizedArrayElementReferences(long offset, PersistenceObjectIdAcceptor iterator)
static long
keyValueBinaryLength()
static long
keyValueReferenceCount(long elementCount)
static int
lengthLength()
abstract void
modifyLoadItem(ByteBuffer directByteBuffer, long offset, long entityTotalLength, long entityTypeId, long entityObjectId)
static int
objectIdByteLength()
boolean
read_boolean(long offset)
byte
read_byte(long offset)
char
read_char(long offset)
double
read_double(long offset)
float
read_float(long offset)
int
read_int(long offset)
long
read_long(long offset)
short
read_short(long offset)
static long
referenceBinaryLength(long referenceCount)
void
registerHelper(Object key, Object helper)
Helper instances can be used as temporary additional state for the duration of the building process.void
store_boolean(boolean value)
void
store_boolean(long offset, boolean value)
void
store_booleans(long typeId, long objectId, boolean[] array)
void
store_byte(byte value)
void
store_byte(long offset, byte value)
void
store_bytes(long typeId, long objectId, byte[] array)
void
store_char(char value)
void
store_char(long offset, char value)
void
store_chars(long typeId, long objectId, char[] array)
void
store_double(double value)
void
store_double(long offset, double value)
void
store_doubles(long typeId, long objectId, double[] array)
void
store_float(float value)
void
store_float(long offset, float value)
void
store_floats(long typeId, long objectId, float[] array)
void
store_int(int value)
void
store_int(long offset, int value)
void
store_ints(long typeId, long objectId, int[] array)
void
store_long(long value)
void
store_long(long offset, long value)
void
store_longs(long typeId, long objectId, long[] array)
void
store_short(long offset, short value)
void
store_short(short value)
void
store_shorts(long typeId, long objectId, short[] array)
void
storeBoolean(long typeId, long objectId, boolean value)
void
storeByte(long typeId, long objectId, byte value)
void
storeCharacter(long typeId, long objectId, char value)
long
storeCharsAsList(long memoryOffset, char[] chars, int offset, int length)
void
storeDouble(long typeId, long objectId, double value)
abstract void
storeEntityHeader(long entityContentLength, long entityTypeId, long entityObjectId)
void
storeFixedSize(PersistenceStoreHandler handler, long contentLength, long typeId, long objectId, Object instance, long[] memoryOffsets, BinaryValueStorer[] storers)
void
storeFloat(long typeId, long objectId, float value)
void
storeInteger(long typeId, long objectId, int value)
void
storeIterableAsList(long tid, long oid, long headerOffset, Iterable<?> elements, long size, PersistenceFunction persister)
void
storeIterableContentAsList(long offset, PersistenceFunction persister, Iterable<?> elements, long elementCount)
void
storeKeyValuesAsEntries(long typeId, long objectId, long headerOffset, Iterable<? extends KeyValue<?,?>> keyValues, long size, PersistenceFunction persister)
void
storeKeyValuesAsEntries(long offset, PersistenceFunction persister, Iterable<? extends KeyValue<?,?>> elements, long elementCount)
void
storeListHeader(long offset, long elementsBinaryLength, long elementsCount)
void
storeLong(long typeId, long objectId, long value)
<K,V>
voidstoreMapEntrySet(long typeId, long objectId, long headerOffset, Set<Map.Entry<K,V>> entrySet, PersistenceFunction persister)
void
storeReferences(long typeId, long objectId, long binaryOffset, PersistenceStoreHandler idResolver, Object[] array)
void
storeReferences(long typeId, long objectId, long binaryOffset, PersistenceStoreHandler idResolver, Object[] array, int arrayOffset, int arrayLength)
void
storeReferencesAsList(long memoryOffset, PersistenceStoreHandler persister, Object[] array, int offset, int length)
void
storeRoots(long typeId, long objectId, XGettingTable<String,Object> entries, PersistenceStoreHandler idResolver)
void
storeShort(long typeId, long objectId, short value)
void
storeSizedArray(long tid, long oid, long headerOffset, Object[] array, int offset, int size, PersistenceStoreHandler persister)
void
storeSizedArray(long tid, long oid, long headerOffset, Object[] array, int size, PersistenceStoreHandler persister)
void
storeStateless(long typeId, long objectId)
void
storeStringsAsList(long memoryOffset, long precalculatedContentBinaryLength, String[] strings)
void
storeStringsAsList(long memoryOffset, long precalculatedContentBinaryLength, String[] strings, int offset, int length)
void
storeStringValue(long typeId, long objectId, char[] chars)
void
storeStringValue(long typeId, long objectId, char[] chars, int offset, int length)
void
storeStringValue(long typeId, long objectId, String string)
static long
toBinaryListByteLengthOffset(long binaryListOffset)
static long
toBinaryListContentByteLength(long binaryListTotalByteLength)
static long
toBinaryListElementCountOffset(long binaryListOffset)
static long
toBinaryListElementsOffset(long binaryListOffset)
static long
toBinaryListTotalByteLength(long binaryListElementsByteLength)
static long
toEntityContentOffset(long entityOffset)
void
update_booleans(boolean[] array)
void
update_booleans(long offset, boolean[] array)
void
update_bytes(byte[] array)
void
update_bytes(long offset, byte[] array)
void
update_chars(char[] array)
void
update_chars(long offset, char[] array)
void
update_doubles(double[] array)
void
update_doubles(long offset, double[] array)
void
update_floats(float[] array)
void
update_floats(long offset, float[] array)
void
update_ints(int[] array)
void
update_ints(long offset, int[] array)
void
update_longs(long[] array)
void
update_longs(long offset, long[] array)
void
update_shorts(long offset, short[] array)
void
update_shorts(short[] array)
void
updateArrayObjectReferences(long binaryListStartOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array, int arrayOffset, int arrayLength)
void
updateArrayObjectReferences1(long binaryListStartOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array)
void
updateFixedSize(Object instance, BinaryValueSetter[] setters, long[] memoryOffsets, PersistenceObjectIdResolver idResolver)
int
updateSizedArrayObjectReferences(long binaryOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array)
Updates the passed array up to the size defined by the binary data, returns the size.void
validateArrayLength(Object[] array, long headerOffset)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface one.microstream.persistence.binary.types.Chunk
clear, isEmpty, totalLength
-
-
-
-
Method Detail
-
keyValueReferenceCount
public static long keyValueReferenceCount(long elementCount)
-
keyValueBinaryLength
public static long keyValueBinaryLength()
-
binaryListMinimumLength
public static long binaryListMinimumLength()
-
binaryListMaximumLength
public static long binaryListMaximumLength()
-
toBinaryListTotalByteLength
public static long toBinaryListTotalByteLength(long binaryListElementsByteLength)
-
toBinaryListContentByteLength
public static long toBinaryListContentByteLength(long binaryListTotalByteLength)
-
lengthLength
public static int lengthLength()
- Returns:
- the length in bytes of a peristent item's length field (8 bytes).
-
isValidGapLength
public static boolean isValidGapLength(long gapLength)
-
isValidEntityLength
public static boolean isValidEntityLength(long entityLength)
-
entityHeaderLength
public static int entityHeaderLength()
-
entityTotalLength
public static long entityTotalLength(long entityContentLength)
-
entityContentLength
public static long entityContentLength(long entityTotalLength)
-
toEntityContentOffset
public static long toEntityContentOffset(long entityOffset)
-
toBinaryListByteLengthOffset
public static final long toBinaryListByteLengthOffset(long binaryListOffset)
-
toBinaryListElementCountOffset
public static final long toBinaryListElementCountOffset(long binaryListOffset)
-
toBinaryListElementsOffset
public static long toBinaryListElementsOffset(long binaryListOffset)
-
objectIdByteLength
public static int objectIdByteLength()
-
referenceBinaryLength
public static long referenceBinaryLength(long referenceCount)
-
calculateReferenceListTotalBinaryLength
public static long calculateReferenceListTotalBinaryLength(long count)
-
calculateStringListContentBinaryLength
public static long calculateStringListContentBinaryLength(String[] strings)
-
calculateBinaryLengthChars
public static long calculateBinaryLengthChars(long count)
-
getEntityLengthRawValue
public static final long getEntityLengthRawValue(long entityAddress)
-
getEntityTypeIdRawValue
public static final long getEntityTypeIdRawValue(long entityAddress)
-
getEntityObjectIdRawValue
public static final long getEntityObjectIdRawValue(long entityAddress)
-
buffers
public abstract ByteBuffer[] buffers()
-
isSwitchedByteOrder
public boolean isSwitchedByteOrder()
-
getEntityLength
public final long getEntityLength()
-
getEntityTypeId
public final long getEntityTypeId()
-
getEntityObjectId
public final long getEntityObjectId()
-
getBuildItemContentLength
public final long getBuildItemContentLength()
-
getBuildItemTypeId
public final long getBuildItemTypeId()
-
getBuildItemObjectId
public final long getBuildItemObjectId()
-
storeEntityHeader
public abstract void storeEntityHeader(long entityContentLength, long entityTypeId, long entityObjectId)
-
getListElementCountKeyValue
public final long getListElementCountKeyValue(long listStartOffset)
-
read_byte
public final byte read_byte(long offset)
-
read_boolean
public final boolean read_boolean(long offset)
-
read_short
public final short read_short(long offset)
-
read_char
public final char read_char(long offset)
-
read_int
public final int read_int(long offset)
-
read_float
public final float read_float(long offset)
-
read_long
public final long read_long(long offset)
-
read_double
public final double read_double(long offset)
-
channelChunk
public abstract Binary channelChunk(int channelIndex)
-
channelCount
public abstract int channelCount()
-
iterateEntityData
public abstract void iterateEntityData(BinaryEntityDataReader reader)
-
storeKeyValuesAsEntries
public final void storeKeyValuesAsEntries(long typeId, long objectId, long headerOffset, Iterable<? extends KeyValue<?,?>> keyValues, long size, PersistenceFunction persister)
-
storeMapEntrySet
public final <K,V> void storeMapEntrySet(long typeId, long objectId, long headerOffset, Set<Map.Entry<K,V>> entrySet, PersistenceFunction persister)
-
storeSizedArray
public final void storeSizedArray(long tid, long oid, long headerOffset, Object[] array, int size, PersistenceStoreHandler persister)
-
storeSizedArray
public final void storeSizedArray(long tid, long oid, long headerOffset, Object[] array, int offset, int size, PersistenceStoreHandler persister)
-
storeRoots
public final void storeRoots(long typeId, long objectId, XGettingTable<String,Object> entries, PersistenceStoreHandler idResolver)
-
buildRootMapping
public final <T extends XAddingMap<String,Long>> T buildRootMapping(T mapping)
-
storeIterableAsList
public final void storeIterableAsList(long tid, long oid, long headerOffset, Iterable<?> elements, long size, PersistenceFunction persister)
-
getSizedArrayElementCount
public int getSizedArrayElementCount(long headerOffset)
-
getSizedArrayLength
public final int getSizedArrayLength(long sizedArrayOffset)
-
getSizedArrayElementsAddress
public final long getSizedArrayElementsAddress(long headerOffset)
-
validateArrayLength
public final void validateArrayLength(Object[] array, long headerOffset)
-
getBinaryListTotalByteLength
public final long getBinaryListTotalByteLength(long listOffset)
-
getLoadItemAvailableContentLength
public final long getLoadItemAvailableContentLength()
-
getBinaryListElementCountValidating
public final long getBinaryListElementCountValidating(long listOffset, long elementLength)
-
getBinaryListElementCountUnvalidating
public final long getBinaryListElementCountUnvalidating(long listOffset)
-
getListElementCount
public final long getListElementCount(long listStartOffset, int elementLength)
-
getListElementCountReferences
public final long getListElementCountReferences(long listStartOffset)
-
iterateListStructureElements
public final long iterateListStructureElements(long listOffset, BinaryElementReader reader)
Iterates over all elements of a binary list. All elements must have the same binary length.- Parameters:
listOffset
- the binary offset at which the binary list (actually: its header) startsreader
- the reader logic to be used by the iteration.- Returns:
- the element count that has been iterated.
-
iterateListElementReferences
public final void iterateListElementReferences(long listOffset, PersistenceObjectIdAcceptor iterator)
-
iterateSizedArrayElementReferences
public final void iterateSizedArrayElementReferences(long offset, PersistenceObjectIdAcceptor iterator)
-
iterateListStructureReferenceRange
public final void iterateListStructureReferenceRange(long listOffset, int referencesPerElement, PersistenceObjectIdAcceptor iterator)
-
iterateKeyValueEntriesReferences
public final void iterateKeyValueEntriesReferences(long listOffset, PersistenceObjectIdAcceptor iterator)
-
iterateReferenceRange
public final void iterateReferenceRange(long startOffset, long boundOffset, PersistenceObjectIdAcceptor iterator)
-
iterateReferenceRangeUnvalidated
public final void iterateReferenceRangeUnvalidated(long startOffset, long boundOffset, PersistenceObjectIdAcceptor iterator)
-
store_bytes
public final void store_bytes(long typeId, long objectId, byte[] array)
-
store_booleans
public final void store_booleans(long typeId, long objectId, boolean[] array)
-
store_shorts
public final void store_shorts(long typeId, long objectId, short[] array)
-
store_chars
public final void store_chars(long typeId, long objectId, char[] array)
-
store_ints
public final void store_ints(long typeId, long objectId, int[] array)
-
store_floats
public final void store_floats(long typeId, long objectId, float[] array)
-
store_longs
public final void store_longs(long typeId, long objectId, long[] array)
-
store_doubles
public final void store_doubles(long typeId, long objectId, double[] array)
-
storeByte
public final void storeByte(long typeId, long objectId, byte value)
-
storeBoolean
public final void storeBoolean(long typeId, long objectId, boolean value)
-
storeShort
public final void storeShort(long typeId, long objectId, short value)
-
storeCharacter
public final void storeCharacter(long typeId, long objectId, char value)
-
storeInteger
public final void storeInteger(long typeId, long objectId, int value)
-
storeFloat
public final void storeFloat(long typeId, long objectId, float value)
-
storeLong
public final void storeLong(long typeId, long objectId, long value)
-
storeDouble
public final void storeDouble(long typeId, long objectId, double value)
-
storeStateless
public final void storeStateless(long typeId, long objectId)
-
storeStringValue
public final void storeStringValue(long typeId, long objectId, String string)
-
storeStringValue
public final void storeStringValue(long typeId, long objectId, char[] chars)
-
storeStringValue
public final void storeStringValue(long typeId, long objectId, char[] chars, int offset, int length)
-
storeReferences
public final void storeReferences(long typeId, long objectId, long binaryOffset, PersistenceStoreHandler idResolver, Object[] array)
-
storeReferences
public final void storeReferences(long typeId, long objectId, long binaryOffset, PersistenceStoreHandler idResolver, Object[] array, int arrayOffset, int arrayLength)
-
storeFixedSize
public final void storeFixedSize(PersistenceStoreHandler handler, long contentLength, long typeId, long objectId, Object instance, long[] memoryOffsets, BinaryValueStorer[] storers)
-
buildStrings
public final String[] buildStrings(long stringsListOffset)
-
buildByte
public final Byte buildByte()
-
buildByte
public final Byte buildByte(long offset)
-
buildBoolean
public final Boolean buildBoolean()
-
buildBoolean
public final Boolean buildBoolean(long offset)
-
buildShort
public final Short buildShort()
-
buildShort
public final Short buildShort(long offset)
-
buildCharacter
public final Character buildCharacter()
-
buildCharacter
public final Character buildCharacter(long offset)
-
buildInteger
public final Integer buildInteger()
-
buildInteger
public final Integer buildInteger(long offset)
-
buildFloat
public final Float buildFloat()
-
buildFloat
public final Float buildFloat(long offset)
-
buildLong
public final Long buildLong()
-
buildLong
public final Long buildLong(long offset)
-
buildDouble
public final Double buildDouble()
-
buildDouble
public final Double buildDouble(long offset)
-
buildPrimitiveWrapper
public final Object buildPrimitiveWrapper(Class<?> primitiveValueType, long offset)
-
buildString
public final String buildString()
-
create_bytes
public final byte[] create_bytes()
-
create_bytes
public final byte[] create_bytes(long listOffset)
-
create_booleans
public final boolean[] create_booleans()
-
create_booleans
public final boolean[] create_booleans(long listOffset)
-
create_shorts
public final short[] create_shorts()
-
create_shorts
public final short[] create_shorts(long listOffset)
-
create_chars
public final char[] create_chars()
-
create_chars
public final char[] create_chars(long listOffset)
-
create_ints
public final int[] create_ints()
-
create_ints
public final int[] create_ints(long listOffset)
-
create_floats
public final float[] create_floats()
-
create_floats
public final float[] create_floats(long listOffset)
-
create_longs
public final long[] create_longs()
-
create_longs
public final long[] create_longs(long listOffset)
-
create_doubles
public final double[] create_doubles()
-
create_doubles
public final double[] create_doubles(long listOffset)
-
build_bytes
public final byte[] build_bytes()
-
build_bytes
public final byte[] build_bytes(long listOffset)
-
build_booleans
public final boolean[] build_booleans()
-
build_booleans
public final boolean[] build_booleans(long listOffset)
-
build_shorts
public final short[] build_shorts()
-
build_shorts
public final short[] build_shorts(long listOffset)
-
build_chars
public final char[] build_chars()
-
build_chars
public final char[] build_chars(long listOffset)
-
build_ints
public final int[] build_ints()
-
build_ints
public final int[] build_ints(long listOffset)
-
build_floats
public final float[] build_floats()
-
build_floats
public final float[] build_floats(long listOffset)
-
build_longs
public final long[] build_longs()
-
build_longs
public final long[] build_longs(long listOffset)
-
build_doubles
public final double[] build_doubles()
-
build_doubles
public final double[] build_doubles(long listOffset)
-
collectElementsIntoArray
public final void collectElementsIntoArray(long binaryOffset, PersistenceObjectIdResolver oidResolver, Object[] target)
-
collectListObjectReferences
public final int collectListObjectReferences(long binaryOffset, PersistenceObjectIdResolver oidResolver, Consumer<Object> collector)
-
collectObjectReferences
public final void collectObjectReferences(long binaryOffset, int length, PersistenceObjectIdResolver oidResolver, Consumer<Object> collector)
-
collectKeyValueReferences
public final int collectKeyValueReferences(long binaryOffset, int length, PersistenceObjectIdResolver oidResolver, BiConsumer<Object,Object> collector)
-
iterateReferences
public abstract long iterateReferences(BinaryReferenceTraverser[] traversers, PersistenceObjectIdAcceptor acceptor)
-
storeCharsAsList
public final long storeCharsAsList(long memoryOffset, char[] chars, int offset, int length)
-
copyMemory
public final void copyMemory(ByteBuffer directByteBuffer, long offset, BinaryValueSetter[] setters, long[] targetOffsets)
-
storeListHeader
public final void storeListHeader(long offset, long elementsBinaryLength, long elementsCount)
-
storeIterableContentAsList
public final void storeIterableContentAsList(long offset, PersistenceFunction persister, Iterable<?> elements, long elementCount)
-
storeStringsAsList
public final void storeStringsAsList(long memoryOffset, long precalculatedContentBinaryLength, String[] strings)
-
storeStringsAsList
public final void storeStringsAsList(long memoryOffset, long precalculatedContentBinaryLength, String[] strings, int offset, int length)
-
storeKeyValuesAsEntries
public final void storeKeyValuesAsEntries(long offset, PersistenceFunction persister, Iterable<? extends KeyValue<?,?>> elements, long elementCount)
-
storeReferencesAsList
public final void storeReferencesAsList(long memoryOffset, PersistenceStoreHandler persister, Object[] array, int offset, int length)
-
store_byte
public final void store_byte(long offset, byte value)
-
store_boolean
public final void store_boolean(long offset, boolean value)
-
store_short
public final void store_short(long offset, short value)
-
store_char
public final void store_char(long offset, char value)
-
store_int
public final void store_int(long offset, int value)
-
store_float
public final void store_float(long offset, float value)
-
store_long
public final void store_long(long offset, long value)
-
store_double
public final void store_double(long offset, double value)
-
store_byte
public final void store_byte(byte value)
-
store_boolean
public final void store_boolean(boolean value)
-
store_short
public final void store_short(short value)
-
store_char
public final void store_char(char value)
-
store_int
public final void store_int(int value)
-
store_float
public final void store_float(float value)
-
store_long
public final void store_long(long value)
-
store_double
public final void store_double(double value)
-
modifyLoadItem
public abstract void modifyLoadItem(ByteBuffer directByteBuffer, long offset, long entityTotalLength, long entityTypeId, long entityObjectId)
-
updateFixedSize
public final void updateFixedSize(Object instance, BinaryValueSetter[] setters, long[] memoryOffsets, PersistenceObjectIdResolver idResolver)
-
updateSizedArrayObjectReferences
public final int updateSizedArrayObjectReferences(long binaryOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array)
Updates the passed array up to the size defined by the binary data, returns the size.
-
updateArrayObjectReferences1
public final void updateArrayObjectReferences1(long binaryListStartOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array)
-
updateArrayObjectReferences
public final void updateArrayObjectReferences(long binaryListStartOffset, PersistenceObjectIdResolver objectIdResolver, Object[] array, int arrayOffset, int arrayLength)
-
update_bytes
public final void update_bytes(byte[] array)
-
update_bytes
public final void update_bytes(long offset, byte[] array)
-
update_booleans
public final void update_booleans(boolean[] array)
-
update_booleans
public final void update_booleans(long offset, boolean[] array)
-
update_shorts
public final void update_shorts(short[] array)
-
update_shorts
public final void update_shorts(long offset, short[] array)
-
update_chars
public final void update_chars(char[] array)
-
update_chars
public final void update_chars(long offset, char[] array)
-
update_ints
public final void update_ints(int[] array)
-
update_ints
public final void update_ints(long offset, int[] array)
-
update_floats
public final void update_floats(float[] array)
-
update_floats
public final void update_floats(long offset, float[] array)
-
update_longs
public final void update_longs(long[] array)
-
update_longs
public final void update_longs(long offset, long[] array)
-
update_doubles
public final void update_doubles(double[] array)
-
update_doubles
public final void update_doubles(long offset, double[] array)
-
registerHelper
public final void registerHelper(Object key, Object helper)
Helper instances can be used as temporary additional state for the duration of the building process. E.g.: JDK hash collections cannot properly collect elements during the building process as the element instances might still be in an initialized state without their proper data, so hashing and equality comparisons would fail or result in all elements being "equal". So building JDK hash collections required to pre-collect their elements in an additional helper structure and defer the actual elements collecting to the completion.Similar problems with other or complex custom handlers are conceivable.
Only one helper object can be registered per subject instance (the instance to be built).
-
getHelper
public final Object getHelper(Object key)
Helper instances can be used as temporary additional state for the duration of the building process. E.g.: JDK hash collections cannot properly collect elements during the building process as the element instances might still be in an initialized state without their proper data, so hashing and equality comparisons would failt or result in all elements being "equal". So building JDK hash collections required to pre-collect their elements in an additional helper structure and defer the actual elements collecting to the completion.Similar problems with other or complex custom handlers are conceivable.
-
-