public class MemoryBlock extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
address |
protected int |
size |
| Modifier | Constructor and Description |
|---|---|
|
MemoryBlock() |
|
MemoryBlock(com.hazelcast.internal.memory.GlobalMemoryAccessor memoryAccessor) |
protected |
MemoryBlock(com.hazelcast.internal.memory.GlobalMemoryAccessor memoryAccessor,
long address,
int size) |
|
MemoryBlock(long address,
int size) |
| Modifier and Type | Method and Description |
|---|---|
long |
address() |
void |
copyFrom(long destinationOffset,
Object source,
long offset,
int length)
Copies bytes from source object to this MemoryBlock.
|
void |
copyFromByteArray(long destinationOffset,
byte[] source,
int offset,
int length)
Copies bytes from source byte-array to this MemoryBlock.
|
void |
copyTo(long sourceOffset,
Object destination,
long offset,
int length)
Copies bytes from this MemoryBlock to given destination object.
|
void |
copyToByteArray(long sourceOffset,
byte[] destination,
int offset,
int length)
Copies bytes from this MemoryBlock to given byte-array.
|
boolean |
equals(Object o) |
int |
hashCode() |
byte |
readByte(long offset) |
char |
readChar(long offset) |
double |
readDouble(long offset) |
float |
readFloat(long offset) |
int |
readInt(long offset) |
long |
readLong(long offset) |
short |
readShort(long offset) |
protected void |
setAddress(long address) |
protected void |
setSize(int size) |
int |
size() |
String |
toString() |
void |
writeByte(long offset,
byte value) |
void |
writeChar(long offset,
char value) |
void |
writeDouble(long offset,
double value) |
void |
writeFloat(long offset,
float value) |
void |
writeInt(long offset,
int value) |
void |
writeLong(long offset,
long value) |
void |
writeShort(long offset,
short value) |
void |
zero() |
public MemoryBlock()
public MemoryBlock(com.hazelcast.internal.memory.GlobalMemoryAccessor memoryAccessor)
public MemoryBlock(long address,
int size)
protected MemoryBlock(com.hazelcast.internal.memory.GlobalMemoryAccessor memoryAccessor,
long address,
int size)
public final byte readByte(long offset)
public final void writeByte(long offset,
byte value)
public final int readInt(long offset)
public final void writeInt(long offset,
int value)
public final long readLong(long offset)
public final void writeLong(long offset,
long value)
public final char readChar(long offset)
public final void writeChar(long offset,
char value)
public final double readDouble(long offset)
public final void writeDouble(long offset,
double value)
public final float readFloat(long offset)
public final void writeFloat(long offset,
float value)
public final short readShort(long offset)
public final void writeShort(long offset,
short value)
public final void copyFromByteArray(long destinationOffset,
byte[] source,
int offset,
int length)
destinationOffset - offset in this MemoryBlocksource - source byte-array to copy fromoffset - offset in source byte-arraylength - number of bytes to copyIndexOutOfBoundsExceptionpublic final void copyFrom(long destinationOffset,
Object source,
long offset,
int length)
destinationOffset - offset in this MemoryBlocksource - source object to copy fromoffset - offset in source objectlength - number of bytes to copyIndexOutOfBoundsExceptionpublic final void copyToByteArray(long sourceOffset,
byte[] destination,
int offset,
int length)
sourceOffset - offset in this MemoryBlockdestination - destination byte-array to copy tooffset - offset in destination byte-arraylength - number of bytes to copyIndexOutOfBoundsExceptionpublic final void copyTo(long sourceOffset,
Object destination,
long offset,
int length)
sourceOffset - offset in this MemoryBlockdestination - destination object to copy tooffset - offset in destination objectlength - number of bytes to copyIndexOutOfBoundsExceptionpublic final void zero()
public final long address()
public final int size()
protected final void setAddress(long address)
protected final void setSize(int size)
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.