public class KryoPoolSerializer extends Object implements Serializer
Modifier and Type | Class and Description |
---|---|
static class |
KryoPoolSerializer.KryoPoolImpl
由于kryo创建的代价相对较高 ,这里使用空间换时间
对KryoHolder对象进行重用
|
Constructor and Description |
---|
KryoPoolSerializer() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(byte[] bytes)
Deserialize data
|
String |
name()
序列化器的名称,该方法仅用于打印日志的时候显示
|
byte[] |
serialize(Object obj)
Serialize object
|
public byte[] serialize(Object obj)
serialize
in interface Serializer
obj
- what to serializepublic Object deserialize(byte[] bytes)
deserialize
in interface Serializer
bytes
- what to deserializepublic String name()
Serializer
name
in interface Serializer
Copyright © 2018. All rights reserved.