Class AbstractKryoFactory
- java.lang.Object
-
- cn.sliew.milky.serialize.kryo.utils.AbstractKryoFactory
-
- All Implemented Interfaces:
com.esotericsoftware.kryo.pool.KryoFactory
- Direct Known Subclasses:
PooledKryoFactory,PrototypeKryoFactory,ThreadLocalKryoFactory
public abstract class AbstractKryoFactory extends Object implements com.esotericsoftware.kryo.pool.KryoFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractKryoFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description com.esotericsoftware.kryo.Kryocreate()abstract com.esotericsoftware.kryo.KryogetKryo()voidregisterClass(Class clazz)only supposed to be called at startup timeabstract voidreturnKryo(com.esotericsoftware.kryo.Kryo kryo)voidsetRegistrationRequired(boolean registrationRequired)
-
-
-
Method Detail
-
registerClass
public void registerClass(Class clazz)
only supposed to be called at startup timelater may consider adding support for custom serializer, custom id, etc
-
create
public com.esotericsoftware.kryo.Kryo create()
- Specified by:
createin interfacecom.esotericsoftware.kryo.pool.KryoFactory
-
setRegistrationRequired
public void setRegistrationRequired(boolean registrationRequired)
-
returnKryo
public abstract void returnKryo(com.esotericsoftware.kryo.Kryo kryo)
-
getKryo
public abstract com.esotericsoftware.kryo.Kryo getKryo()
-
-