public abstract class KryoPool extends ResourcePool<SerDeState>
Modifier | Constructor and Description |
---|---|
protected |
KryoPool(int poolSize) |
Modifier and Type | Method and Description |
---|---|
<T> T |
deepCopy(T obj) |
java.lang.Object |
fromBytes(byte[] ary) |
<T> T |
fromBytes(byte[] ary,
java.lang.Class<T> cls) |
boolean |
hasRegistration(java.lang.Class obj) |
void |
release(SerDeState st) |
byte[] |
toBytesWithClass(java.lang.Object obj) |
byte[] |
toBytesWithoutClass(java.lang.Object obj) |
static KryoPool |
withBuffer(int poolSize,
KryoInstantiator ki,
int outBufferMin,
int outBufferMax)
Output is created with new Output(outBufferMin, outBufferMax);
|
static KryoPool |
withByteArrayOutputStream(int poolSize,
KryoInstantiator ki)
Output is created with new Output(new ByteArrayOutputStream())
This will automatically resize internally
|
borrow, newInstance
public void release(SerDeState st)
release
in class ResourcePool<SerDeState>
public static KryoPool withBuffer(int poolSize, KryoInstantiator ki, int outBufferMin, int outBufferMax)
public static KryoPool withByteArrayOutputStream(int poolSize, KryoInstantiator ki)
public <T> T deepCopy(T obj)
public java.lang.Object fromBytes(byte[] ary)
public <T> T fromBytes(byte[] ary, java.lang.Class<T> cls)
public byte[] toBytesWithClass(java.lang.Object obj)
public byte[] toBytesWithoutClass(java.lang.Object obj)
public boolean hasRegistration(java.lang.Class obj)