|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MutableDirectBuffer
Abstraction over a range of buffer types that allows fields to be written (put) in native typed fashion.
| Method Summary | |
|---|---|
void |
putByte(int index,
byte value)
Put a value to a given index. |
void |
putBytes(int index,
byte[] src)
Put an array of src into the underlying buffer. |
void |
putBytes(int index,
byte[] src,
int offset,
int length)
Put an array into the underlying buffer. |
void |
putBytes(int index,
ByteBuffer srcBuffer,
int length)
Put bytes into the underlying buffer for the view. |
void |
putBytes(int index,
ByteBuffer srcBuffer,
int srcIndex,
int length)
Put bytes into the underlying buffer for the view. |
void |
putBytes(int index,
DirectBuffer srcBuffer,
int srcIndex,
int length)
Put bytes from a source DirectBuffer into this MutableDirectBuffer at given indices. |
void |
putDouble(int index,
double value)
Put a value to a given index. |
void |
putDouble(int index,
double value,
ByteOrder byteOrder)
Put a value to a given index. |
void |
putFloat(int index,
float value)
Put a value to a given index. |
void |
putFloat(int index,
float value,
ByteOrder byteOrder)
Put a value to a given index. |
void |
putInt(int index,
int value)
Put a value to a given index. |
void |
putInt(int index,
int value,
ByteOrder byteOrder)
Put a value at a given index. |
void |
putLong(int index,
long value)
Put a value at a given index. |
void |
putLong(int index,
long value,
ByteOrder byteOrder)
Put a value at a given index. |
void |
putShort(int index,
short value)
Put a value to a given index. |
void |
putShort(int index,
short value,
ByteOrder byteOrder)
Put a value to a given index. |
int |
putStringUtf8(int offset,
String value,
ByteOrder byteOrder)
Encode a String as UTF-8 bytes to the buffer with a length prefix. |
int |
putStringUtf8(int offset,
String value,
ByteOrder byteOrder,
int maxEncodedSize)
Encode a String as UTF-8 bytes the buffer with a length prefix with a maximum encoded size check. |
int |
putStringWithoutLengthUtf8(int offset,
String value)
Encode a String as UTF-8 bytes in the buffer without a length prefix. |
void |
setMemory(int index,
int length,
byte value)
Set a region of memory to a given byte value. |
| Methods inherited from interface com.hazelcast.client.impl.protocol.util.DirectBuffer |
|---|
addressOffset, boundsCheck, byteArray, byteBuffer, capacity, checkLimit, getByte, getBytes, getBytes, getBytes, getBytes, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringUtf8, getStringUtf8, getStringWithoutLengthUtf8, wrap, wrap, wrap, wrap, wrap, wrap, wrap |
| Method Detail |
|---|
void setMemory(int index,
int length,
byte value)
index - The index at which to start the memory region.length - The length of the run of bytes to set in the memory region.value - The value of the byte that is set in the memory region.
void putLong(int index,
long value,
ByteOrder byteOrder)
index - The index in bytes where the value is put.value - The value to put at the given index.byteOrder - The byteOrder of the value when written.
void putLong(int index,
long value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putInt(int index,
int value,
ByteOrder byteOrder)
index - The index in bytes where the value is put.value - The value put at the given index.byteOrder - The byteOrder of the value when written.
void putInt(int index,
int value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putDouble(int index,
double value,
ByteOrder byteOrder)
index - The index in bytes where the value is put.value - The value put at the given index.byteOrder - The byteOrder of the value when written.
void putDouble(int index,
double value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putFloat(int index,
float value,
ByteOrder byteOrder)
index - The index in bytes where the value is put.value - The value put at the given index.byteOrder - of the value when written.
void putFloat(int index,
float value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putShort(int index,
short value,
ByteOrder byteOrder)
index - The index in bytes where the value is put.value - The value put at the given index.byteOrder - of the value when written.
void putShort(int index,
short value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putByte(int index,
byte value)
index - The index in bytes where the value is put.value - The value put at the given index.
void putBytes(int index,
byte[] src)
index - The index in the underlying buffer from which to start the array.src - The array to be copied into the underlying buffer.
void putBytes(int index,
byte[] src,
int offset,
int length)
index - The index in the underlying buffer from which to start the array.src - The array to be copied into the underlying buffer.offset - The offset in the supplied buffer at which to begin the copy.length - The length of the supplied buffer to copy.
void putBytes(int index,
ByteBuffer srcBuffer,
int length)
Buffer.position() to Buffer.limit().
index - The index in the underlying buffer from which to start the array.srcBuffer - The source buffer to copy the bytes from.length - The length of the supplied buffer to copy.
void putBytes(int index,
ByteBuffer srcBuffer,
int srcIndex,
int length)
index - The index in the underlying buffer from which to start the array.srcBuffer - The source buffer to copy the bytes from (does not change position).srcIndex - The index in the source buffer from which the copy will begin.length - The length in bytes to be copied.
void putBytes(int index,
DirectBuffer srcBuffer,
int srcIndex,
int length)
DirectBuffer into this MutableDirectBuffer at given indices.
index - The index in this buffer from which to begin putting the bytes.srcBuffer - The source buffer from which the bytes will be copied.srcIndex - The index in the source buffer from which the byte copy will begin.length - The length in bytes to be copied.
int putStringUtf8(int offset,
String value,
ByteOrder byteOrder)
offset - The offset at which the String should be encoded.value - The value of the String to be encoded.byteOrder - The byteOrder for the length prefix.
int putStringUtf8(int offset,
String value,
ByteOrder byteOrder,
int maxEncodedSize)
offset - The offset at which the String should be encoded.value - The value of the String to be encoded.byteOrder - The byteOrder for the length prefix.maxEncodedSize - The maximum encoded size to be checked before writing to the buffer.
IllegalArgumentException - if the encoded bytes are greater than maxEncodedSize.
int putStringWithoutLengthUtf8(int offset,
String value)
offset - The offset at which the String begins.value - The value of the String to be encoded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||