Package com.twitter.chill
Class KryoPool
Simple ResourcePool to save on Kryo instances, which
are expensive to allocate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TdeepCopy(T obj) fromBytes(byte[] ary) <T> TbooleanhasRegistration(Class obj) voidrelease(SerDeState st) byte[]toBytesWithClass(Object obj) byte[]static KryoPoolwithBuffer(int poolSize, KryoInstantiator ki, int outBufferMin, int outBufferMax) Output is created with new Output(outBufferMin, outBufferMax);static KryoPoolwithByteArrayOutputStream(int poolSize, KryoInstantiator ki) Output is created with new Output(new ByteArrayOutputStream()) This will automatically resize internallyMethods inherited from class com.twitter.chill.ResourcePool
borrow, newInstance
-
Constructor Details
-
KryoPool
protected KryoPool(int poolSize)
-
-
Method Details
-
release
- Overrides:
releasein classResourcePool<SerDeState>
-
withBuffer
public static KryoPool withBuffer(int poolSize, KryoInstantiator ki, int outBufferMin, int outBufferMax) Output is created with new Output(outBufferMin, outBufferMax); -
withByteArrayOutputStream
Output is created with new Output(new ByteArrayOutputStream()) This will automatically resize internally -
deepCopy
public <T> T deepCopy(T obj) -
fromBytes
-
fromBytes
-
toBytesWithClass
-
toBytesWithoutClass
-
hasRegistration
-