cc.otavia.core.pool

Members list

Type members

Classlikes

abstract class ActorThreadLocal[V <: AnyRef] extends IndexedThreadLocal[V]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
abstract class IndexedThreadLocal[V]

A special variant of ThreadLocal that yields higher access performance when accessed from a ActorThread.

A special variant of ThreadLocal that yields higher access performance when accessed from a ActorThread.

Internally, a ThreadLocal uses a constant index in an array, instead of using hash code and hash table, to look for a variable. Although seemingly very subtle, it yields slight performance advantage over using a hash table, and it is useful when accessed frequently.

To take advantage of this thread-local variable, your thread must be a ActorThread. By default, all actor and channel are running by ActorThread.

Type parameters

V

the type of the thread-local variable

Attributes

See also

java.lang.ThreadLocal

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
abstract class ObjectPool[T <: Poolable]

Light-weight object pool.

Light-weight object pool.

Type parameters

T

the type of the pooled object

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
abstract class PaddedActorThreadLocal[V] extends IndexedThreadLocal[V]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class PerThreadPool[T <: Poolable](val maxSize: Int = ...) extends PoolableHolder[T]

Attributes

Supertypes
trait PoolableHolder[T]
class Object
trait Matchable
class Any
trait Poolable

An object which can be pooled.

An object which can be pooled.

Extends Nextable for intrusive linked-list storage inside PerThreadPool. The next pointer avoids wrapper allocation in the pool's free-list, and clean calls clearNext to detach the node when recycling.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FutureState[R]
class FuturesState[R]
class AbstractPromise[V]
class Stack
class AskStack[A]
class BatchAskStack[A]
class BatchNoticeStack[N]
class ChannelStack[T]
class NoticeStack[N]
Show all
trait PoolableHolder[T <: Poolable]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class PerThreadPool[T]
abstract class ResourceTimer(val parent: TimeoutResource)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
abstract class ThreadLocalObjectPool[T <: Poolable] extends ObjectPool[T]

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class ThreadLocalTimer(val parent: IndexedThreadLocal[_]) extends ResourceTimer

Attributes

Supertypes
class Object
trait Matchable
class Any