Constructor and Description |
---|
ObjectDataType() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object a,
Object b)
Compare two keys.
|
static int |
compareNotNull(byte[] data1,
byte[] data2)
Compare the contents of two byte arrays.
|
static Object |
deserialize(byte[] data)
De-serialize the byte array to an object.
|
int |
getMemory(Object obj)
Estimate the used memory in bytes.
|
Object |
read(ByteBuffer buff)
Read an object.
|
void |
read(ByteBuffer buff,
Object[] obj,
int len,
boolean key)
Read a list of objects.
|
static byte[] |
serialize(Object obj)
Serialize the object to a byte array.
|
void |
write(WriteBuffer buff,
Object obj)
Write an object.
|
void |
write(WriteBuffer buff,
Object[] obj,
int len,
boolean key)
Write a list of objects.
|
public int compare(Object a, Object b)
DataType
public int getMemory(Object obj)
DataType
public void read(ByteBuffer buff, Object[] obj, int len, boolean key)
DataType
public void write(WriteBuffer buff, Object[] obj, int len, boolean key)
DataType
public void write(WriteBuffer buff, Object obj)
DataType
public Object read(ByteBuffer buff)
DataType
public static byte[] serialize(Object obj)
obj
- the object to serializepublic static Object deserialize(byte[] data)
data
- the byte arraypublic static int compareNotNull(byte[] data1, byte[] data2)
This method interprets bytes as unsigned.
data1
- the first byte array (must not be null)data2
- the second byte array (must not be null)Copyright © 2020 JBoss by Red Hat. All rights reserved.