public class KryoSerialization extends java.lang.Object implements Serialization
Modifier and Type | Class and Description |
---|---|
static class |
KryoSerialization.CubaFieldSerializer<T> |
static class |
KryoSerialization.CubaInstantiatorStrategy
Strategy first tries to find and use a no-arg constructor and if it fails to do so, it should try to use
StdInstantiatorStrategy as a fallback, because this one does not invoke any constructor at all. |
static class |
KryoSerialization.CubaJavaSerializer |
static class |
KryoSerialization.CubaOutput |
static class |
KryoSerialization.IndirectContainerSerializer |
class |
KryoSerialization.UnitOfWorkQueryValueHolderSerializer |
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<java.lang.String> |
INCLUDED_VALUE_HOLDER_FIELDS |
protected java.lang.ThreadLocal<com.esotericsoftware.kryo.Kryo> |
kryos |
protected static org.slf4j.Logger |
log |
protected boolean |
onlySerializable |
Constructor and Description |
---|
KryoSerialization() |
KryoSerialization(boolean onlySerializable) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
copy(java.lang.Object object) |
java.lang.Object |
deserialize(byte[] bytes)
Deserialize object from byte array
|
java.lang.Object |
deserialize(java.io.InputStream is)
Deserialize object from stream
|
protected com.esotericsoftware.kryo.Kryo |
newKryoInstance() |
protected void |
registerEntitySerializer(com.esotericsoftware.kryo.Kryo kryo) |
byte[] |
serialize(java.lang.Object object)
Serialize object to byte array
|
void |
serialize(java.lang.Object object,
java.io.OutputStream os)
Serialize object
object to stream os . |
protected static final org.slf4j.Logger log
protected static final java.util.List<java.lang.String> INCLUDED_VALUE_HOLDER_FIELDS
protected boolean onlySerializable
protected final java.lang.ThreadLocal<com.esotericsoftware.kryo.Kryo> kryos
public KryoSerialization()
public KryoSerialization(boolean onlySerializable)
protected com.esotericsoftware.kryo.Kryo newKryoInstance()
public void serialize(java.lang.Object object, java.io.OutputStream os)
Serialization
object
to stream os
.
Stream isn't closed automatically after serialization.
User code should be close stream correctlyserialize
in interface Serialization
object
- objectos
- output streampublic java.lang.Object deserialize(java.io.InputStream is)
Serialization
deserialize
in interface Serialization
public byte[] serialize(java.lang.Object object)
Serialization
serialize
in interface Serialization
public java.lang.Object deserialize(byte[] bytes)
Serialization
deserialize
in interface Serialization
public java.lang.Object copy(java.lang.Object object)
protected void registerEntitySerializer(com.esotericsoftware.kryo.Kryo kryo)