Class KryoPoolQueueImpl
java.lang.Object
com.esotericsoftware.kryo.pool.KryoPoolQueueImpl
- All Implemented Interfaces:
KryoPool
-
Nested Class Summary
Nested classes/interfaces inherited from interface KryoPool
KryoPool.Builder -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionborrow()Takes aKryoinstance from the pool or creates a new one (using the factory) if the pool is empty.voidclear()voidReturns the givenKryoinstance to the pool.<T> Trun(KryoCallback<T> callback) Runs the providedKryoCallbackwith aKryoinstance from the pool (borrow/release aroundKryoCallback.execute(Kryo)).intsize()
-
Field Details
-
queue
-
factory
-
-
Constructor Details
-
KryoPoolQueueImpl
KryoPoolQueueImpl(KryoFactory factory, Queue<Kryo> queue)
-
-
Method Details
-
size
public int size() -
borrow
-
release
-
run
Description copied from interface:KryoPoolRuns the providedKryoCallbackwith aKryoinstance from the pool (borrow/release aroundKryoCallback.execute(Kryo)). -
clear
public void clear()
-