Package one.microstream.memory
Class MemoryAccessorReversing
java.lang.Object
one.microstream.memory.MemoryAccessorReversing
- All Implemented Interfaces:
MemoryAccessor
public class MemoryAccessorReversing extends Object implements MemoryAccessor
-
Method Summary
Modifier and Type Method Description longallocateMemory(long bytes)byte[]asByteArray(long value)byte[]asByteArray(long[] values)voidcopyArrayToAddress(boolean[] array, long targetAddress)voidcopyArrayToAddress(byte[] array, long targetAddress)voidcopyArrayToAddress(char[] array, long targetAddress)voidcopyArrayToAddress(double[] array, long targetAddress)voidcopyArrayToAddress(float[] array, long targetAddress)voidcopyArrayToAddress(int[] array, long targetAddress)voidcopyArrayToAddress(long[] array, long targetAddress)voidcopyArrayToAddress(short[] array, long targetAddress)voidcopyRange(long sourceAddress, long targetAddress, long length)voidcopyRangeToArray(long sourceAddress, boolean[] target)voidcopyRangeToArray(long sourceAddress, byte[] target)voidcopyRangeToArray(long sourceAddress, char[] target)voidcopyRangeToArray(long sourceAddress, double[] target)voidcopyRangeToArray(long sourceAddress, float[] target)voidcopyRangeToArray(long sourceAddress, int[] target)voidcopyRangeToArray(long sourceAddress, long[] target)voidcopyRangeToArray(long sourceAddress, short[] target)MemoryStatisticscreateHeapMemoryStatistics()MemoryStatisticscreateNonHeapMemoryStatistics()booleandeallocateDirectByteBuffer(ByteBuffer directBuffer)voidensureClassInitialized(Class<?> c)voidensureClassInitialized(Class<?> c, Iterable<Field> usedFields)Uses the passed fields if required by the implementation.voidfillMemory(long address, long length, byte value)voidfreeMemory(long address)booleanget_boolean(long address)booleanget_boolean(Object instance, long offset)byteget_byte(long address)byteget_byte(Object instance, long offset)charget_char(long address)charget_char(Object instance, long offset)doubleget_double(long address)doubleget_double(Object instance, long offset)floatget_float(long address)floatget_float(Object instance, long offset)intget_int(long address)intget_int(Object instance, long offset)longget_long(long address)longget_long(Object instance, long offset)shortget_short(long address)shortget_short(Object instance, long offset)longgetDirectByteBufferAddress(ByteBuffer directBuffer)ObjectgetObject(Object instance, long offset)ByteBufferguaranteeDirectByteBuffer(ByteBuffer directBuffer)voidguaranteeUsability()Guarantees the full usability of this class by validating if all functionality is usable.<T> TinstantiateBlank(Class<T> c)booleanisDirectByteBuffer(ByteBuffer byteBuffer)booleanisReversing()longobjectFieldOffset(Class<?> objectClass, Field field)Similar toMemoryAccessor.objectFieldOffset(Field), but with the specific object class.
The difference is that the actual object's class is not the declaring class of its fields if it only extends another class but does not declare an object field itself.longobjectFieldOffset(Field field)Returns an unspecified, abstract "offset" of the passedFieldto specify a generic access of the field's value for an instance of its declaring class that can be used with object-based methods likeMemoryAccessor.set_int(Object, long, int).long[]objectFieldOffsets(Class<?> objectClass, Field... fields)Array alias vor #objectFieldOffset(Class, Field).long[]objectFieldOffsets(Field... fields)Array alias vor #objectFieldOffset(Field).longreallocateMemory(long address, long bytes)voidset_boolean(long address, boolean value)voidset_boolean(Object instance, long offset, boolean value)voidset_booleanInBytes(byte[] bytes, int index, boolean value)voidset_byte(long address, byte value)voidset_byte(Object instance, long offset, byte value)voidset_byteInBytes(byte[] bytes, int index, byte value)voidset_char(long address, char value)voidset_char(Object instance, long offset, char value)voidset_charInBytes(byte[] bytes, int index, char value)voidset_double(long address, double value)voidset_double(Object instance, long offset, double value)voidset_doubleInBytes(byte[] bytes, int index, double value)voidset_float(long address, float value)voidset_float(Object instance, long offset, float value)voidset_floatInBytes(byte[] bytes, int index, float value)voidset_int(long address, int value)voidset_int(Object instance, long offset, int value)voidset_intInBytes(byte[] bytes, int index, int value)voidset_long(long address, long value)voidset_long(Object instance, long offset, long value)voidset_longInBytes(byte[] bytes, int index, long value)voidset_short(long address, short value)voidset_short(Object instance, long offset, short value)voidset_shortInBytes(byte[] bytes, int index, short value)voidsetObject(Object instance, long offset, Object value)MemoryAccessortoReversing()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface one.microstream.memory.MemoryAccessor
objectFieldOffsets, objectFieldOffsets
-
Method Details
-
guaranteeUsability
public final void guaranteeUsability()Description copied from interface:MemoryAccessorGuarantees the full usability of this class by validating if all functionality is usable.- Specified by:
guaranteeUsabilityin interfaceMemoryAccessor
-
getDirectByteBufferAddress
- Specified by:
getDirectByteBufferAddressin interfaceMemoryAccessor
-
deallocateDirectByteBuffer
- Specified by:
deallocateDirectByteBufferin interfaceMemoryAccessor
-
isDirectByteBuffer
- Specified by:
isDirectByteBufferin interfaceMemoryAccessor
-
guaranteeDirectByteBuffer
- Specified by:
guaranteeDirectByteBufferin interfaceMemoryAccessor
-
allocateMemory
public final long allocateMemory(long bytes)- Specified by:
allocateMemoryin interfaceMemoryAccessor
-
reallocateMemory
public final long reallocateMemory(long address, long bytes)- Specified by:
reallocateMemoryin interfaceMemoryAccessor
-
freeMemory
public final void freeMemory(long address)- Specified by:
freeMemoryin interfaceMemoryAccessor
-
fillMemory
public final void fillMemory(long address, long length, byte value)- Specified by:
fillMemoryin interfaceMemoryAccessor
-
get_byte
public final byte get_byte(long address)- Specified by:
get_bytein interfaceMemoryAccessor
-
get_boolean
public final boolean get_boolean(long address)- Specified by:
get_booleanin interfaceMemoryAccessor
-
get_short
public final short get_short(long address)- Specified by:
get_shortin interfaceMemoryAccessor
-
get_char
public final char get_char(long address)- Specified by:
get_charin interfaceMemoryAccessor
-
get_int
public final int get_int(long address)- Specified by:
get_intin interfaceMemoryAccessor
-
get_float
public final float get_float(long address)- Specified by:
get_floatin interfaceMemoryAccessor
-
get_long
public final long get_long(long address)- Specified by:
get_longin interfaceMemoryAccessor
-
get_double
public final double get_double(long address)- Specified by:
get_doublein interfaceMemoryAccessor
-
get_byte
- Specified by:
get_bytein interfaceMemoryAccessor
-
get_boolean
- Specified by:
get_booleanin interfaceMemoryAccessor
-
get_short
- Specified by:
get_shortin interfaceMemoryAccessor
-
get_char
- Specified by:
get_charin interfaceMemoryAccessor
-
get_int
- Specified by:
get_intin interfaceMemoryAccessor
-
get_float
- Specified by:
get_floatin interfaceMemoryAccessor
-
get_long
- Specified by:
get_longin interfaceMemoryAccessor
-
get_double
- Specified by:
get_doublein interfaceMemoryAccessor
-
getObject
- Specified by:
getObjectin interfaceMemoryAccessor
-
set_byte
public final void set_byte(long address, byte value)- Specified by:
set_bytein interfaceMemoryAccessor
-
set_boolean
public final void set_boolean(long address, boolean value)- Specified by:
set_booleanin interfaceMemoryAccessor
-
set_short
public final void set_short(long address, short value)- Specified by:
set_shortin interfaceMemoryAccessor
-
set_char
public final void set_char(long address, char value)- Specified by:
set_charin interfaceMemoryAccessor
-
set_int
public final void set_int(long address, int value)- Specified by:
set_intin interfaceMemoryAccessor
-
set_float
public final void set_float(long address, float value)- Specified by:
set_floatin interfaceMemoryAccessor
-
set_long
public final void set_long(long address, long value)- Specified by:
set_longin interfaceMemoryAccessor
-
set_double
public final void set_double(long address, double value)- Specified by:
set_doublein interfaceMemoryAccessor
-
set_byte
- Specified by:
set_bytein interfaceMemoryAccessor
-
set_boolean
- Specified by:
set_booleanin interfaceMemoryAccessor
-
set_short
- Specified by:
set_shortin interfaceMemoryAccessor
-
set_char
- Specified by:
set_charin interfaceMemoryAccessor
-
set_int
- Specified by:
set_intin interfaceMemoryAccessor
-
set_float
- Specified by:
set_floatin interfaceMemoryAccessor
-
set_long
- Specified by:
set_longin interfaceMemoryAccessor
-
set_double
- Specified by:
set_doublein interfaceMemoryAccessor
-
setObject
- Specified by:
setObjectin interfaceMemoryAccessor
-
copyRange
public final void copyRange(long sourceAddress, long targetAddress, long length)- Specified by:
copyRangein interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, byte[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, boolean[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, short[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, char[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, int[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, float[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, long[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyRangeToArray
public final void copyRangeToArray(long sourceAddress, double[] target)- Specified by:
copyRangeToArrayin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(byte[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(boolean[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(short[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(char[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(int[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(float[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(long[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
copyArrayToAddress
public final void copyArrayToAddress(double[] array, long targetAddress)- Specified by:
copyArrayToAddressin interfaceMemoryAccessor
-
set_byteInBytes
public final void set_byteInBytes(byte[] bytes, int index, byte value)- Specified by:
set_byteInBytesin interfaceMemoryAccessor
-
set_booleanInBytes
public final void set_booleanInBytes(byte[] bytes, int index, boolean value)- Specified by:
set_booleanInBytesin interfaceMemoryAccessor
-
set_shortInBytes
public final void set_shortInBytes(byte[] bytes, int index, short value)- Specified by:
set_shortInBytesin interfaceMemoryAccessor
-
set_charInBytes
public final void set_charInBytes(byte[] bytes, int index, char value)- Specified by:
set_charInBytesin interfaceMemoryAccessor
-
set_intInBytes
public final void set_intInBytes(byte[] bytes, int index, int value)- Specified by:
set_intInBytesin interfaceMemoryAccessor
-
set_floatInBytes
public final void set_floatInBytes(byte[] bytes, int index, float value)- Specified by:
set_floatInBytesin interfaceMemoryAccessor
-
set_longInBytes
public final void set_longInBytes(byte[] bytes, int index, long value)- Specified by:
set_longInBytesin interfaceMemoryAccessor
-
set_doubleInBytes
public final void set_doubleInBytes(byte[] bytes, int index, double value)- Specified by:
set_doubleInBytesin interfaceMemoryAccessor
-
asByteArray
public final byte[] asByteArray(long[] values)- Specified by:
asByteArrayin interfaceMemoryAccessor
-
asByteArray
public final byte[] asByteArray(long value)- Specified by:
asByteArrayin interfaceMemoryAccessor
-
objectFieldOffset
Returns an unspecified, abstract "offset" of the passedFieldto specify a generic access of the field's value for an instance of its declaring class that can be used with object-based methods likeMemoryAccessor.set_int(Object, long, int). Whether that offset is an actual low-level memory offset relative to an instance' field offset base or simply an index of the passed field in its declaring class' list of fields, is implementation-specific.- Specified by:
objectFieldOffsetin interfaceMemoryAccessor- Parameters:
field- theFieldwhose abstract offset shall be determined.- Returns:
- the passed
Field's abstract offset.
-
objectFieldOffsets
Array alias vor #objectFieldOffset(Field).- Specified by:
objectFieldOffsetsin interfaceMemoryAccessor
-
objectFieldOffset
Similar toMemoryAccessor.objectFieldOffset(Field), but with the specific object class.
The difference is that the actual object's class is not the declaring class of its fields if it only extends another class but does not declare an object field itself.- Specified by:
objectFieldOffsetin interfaceMemoryAccessor
-
objectFieldOffsets
Array alias vor #objectFieldOffset(Class, Field).- Specified by:
objectFieldOffsetsin interfaceMemoryAccessor
-
ensureClassInitialized
- Specified by:
ensureClassInitializedin interfaceMemoryAccessor
-
ensureClassInitialized
Description copied from interface:MemoryAccessorUses the passed fields if required by the implementation. If not, this method behaves exactely likeMemoryAccessor.ensureClassInitialized(Class).- Specified by:
ensureClassInitializedin interfaceMemoryAccessor
-
instantiateBlank
- Specified by:
instantiateBlankin interfaceMemoryAccessor- Throws:
InstantiationRuntimeException
-
createHeapMemoryStatistics
- Specified by:
createHeapMemoryStatisticsin interfaceMemoryAccessor
-
createNonHeapMemoryStatistics
- Specified by:
createNonHeapMemoryStatisticsin interfaceMemoryAccessor
-
isReversing
public final boolean isReversing()- Specified by:
isReversingin interfaceMemoryAccessor
-
toReversing
- Specified by:
toReversingin interfaceMemoryAccessor
-