Package com.esotericsoftware.kryo.pool
Class KryoPool.Builder
- java.lang.Object
-
- com.esotericsoftware.kryo.pool.KryoPool.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder(KryoFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KryoPool
build()
Build the pool.KryoPool.Builder
queue(Queue<Kryo> queue)
Use the given queue for pooling kryo instances (by default aConcurrentLinkedQueue
is used).KryoPool.Builder
softReferences()
UseSoftReference
s for pooledKryo
instances, so that instances may be garbage collected when there's memory demand (by default disabled).String
toString()
-
-
-
Constructor Detail
-
Builder
public Builder(KryoFactory factory)
-
-
Method Detail
-
queue
public KryoPool.Builder queue(Queue<Kryo> queue)
Use the given queue for pooling kryo instances (by default aConcurrentLinkedQueue
is used).
-
softReferences
public KryoPool.Builder softReferences()
UseSoftReference
s for pooledKryo
instances, so that instances may be garbage collected when there's memory demand (by default disabled).
-
build
public KryoPool build()
Build the pool.
-
-