public class KryoSerialization extends java.lang.Object implements Serialization
Constructor and Description |
---|
KryoSerialization() |
KryoSerialization(com.esotericsoftware.kryo.Kryo kryo) |
Modifier and Type | Method and Description |
---|---|
com.esotericsoftware.kryo.Kryo |
getKryo() |
int |
getLengthLength()
The fixed number of bytes that will be written by
Serialization.writeLength(ByteBuffer, int) and read by
Serialization.readLength(ByteBuffer) . |
java.lang.Object |
read(Connection connection,
java.nio.ByteBuffer buffer) |
int |
readLength(java.nio.ByteBuffer buffer) |
void |
write(Connection connection,
java.nio.ByteBuffer buffer,
java.lang.Object object) |
void |
writeLength(java.nio.ByteBuffer buffer,
int length) |
public KryoSerialization()
public KryoSerialization(com.esotericsoftware.kryo.Kryo kryo)
public com.esotericsoftware.kryo.Kryo getKryo()
public void write(Connection connection, java.nio.ByteBuffer buffer, java.lang.Object object)
write
in interface Serialization
connection
- May be null.public java.lang.Object read(Connection connection, java.nio.ByteBuffer buffer)
read
in interface Serialization
public void writeLength(java.nio.ByteBuffer buffer, int length)
writeLength
in interface Serialization
public int readLength(java.nio.ByteBuffer buffer)
readLength
in interface Serialization
public int getLengthLength()
Serialization
Serialization.writeLength(ByteBuffer, int)
and read by
Serialization.readLength(ByteBuffer)
.getLengthLength
in interface Serialization