ThreadLocalObjectPool

cc.otavia.core.pool.ThreadLocalObjectPool
See theThreadLocalObjectPool companion object
abstract class ThreadLocalObjectPool[T <: Poolable] extends ObjectPool[T]

Attributes

Companion
object
Graph
Supertypes
class ObjectPool[T]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def get(): T

Get a object from the ObjectPool. The returned object may be created via newObject if no pooled object is ready to be reused.

Get a object from the ObjectPool. The returned object may be created via newObject if no pooled object is ready to be reused.

Attributes

Definition Classes
override def recycle(poolable: T): Unit

Recycle the object if possible and so make it ready to be reused.

Recycle the object if possible and so make it ready to be reused.

Value parameters

poolable

Poolable object T

Attributes

Definition Classes

Inherited methods

final protected def create(): T

Creates a new Object which has been set Poolable.creatorThread by the current thread.

Creates a new Object which has been set Poolable.creatorThread by the current thread.

Attributes

Returns

a new Poolable object.

Inherited from:
ObjectPool

Inherited and Abstract methods

protected def newObject(): T

Used by user to define how to create a new Poolable object.

Used by user to define how to create a new Poolable object.

Attributes

Returns

a object which has not been set Poolable.creatorThread.

Inherited from:
ObjectPool