Uses of Interface
stormpot.Poolable
-
-
Uses of Poolable in stormpot
Classes in stormpot with type parameters of type Poolable Modifier and Type Interface Description interface
Allocator<T extends Poolable>
An Allocator is responsible for the creation and destruction ofPoolable
objects.interface
Expiration<T extends Poolable>
The expiration is used to determine if a given slot has expired, or otherwise become invalid.class
Pool<T extends Poolable>
A Pool is a self-renewable set of objects from which one can claim exclusive access to elements, until they are released back into the pool.class
PoolBuilder<T extends Poolable>
ThePoolBuilder
collects information about how big a pool should be, and how it should allocate objects, an so on, and finally acts as the factory for building the pool instances themselves, with thePoolBuilder.build()
method.class
PoolTap<T extends Poolable>
A PoolTap provides the API for accessing objects in aPool
.interface
Reallocator<T extends Poolable>
interface
SlotInfo<T extends Poolable>
An informative interface, used byExpiration
instances to determine if a slot has expired or is still invalid for claiming.Classes in stormpot that implement Poolable Modifier and Type Class Description class
BasePoolable
A basic implementation of thePoolable
interface, which can be extended directly.class
Pooled<T>
A reference to a pooled object.Methods in stormpot with type parameters of type Poolable Modifier and Type Method Description static <T extends Poolable>
Expiration<T>Expiration. after(long fromTime, long toTime, java.util.concurrent.TimeUnit unit)
Construct a new Expiration that will invalidate objects that are older than the given lower bound, before they get older than the upper bound, in the given time unit.static <T extends Poolable>
Expiration<T>Expiration. after(long time, java.util.concurrent.TimeUnit unit)
Construct a new Expiration that will invalidate objects that are older than the exact provided span of time in the given unit.static <T extends Poolable>
PoolBuilder<T>Pool. from(Allocator<T> allocator)
Get aPoolBuilder
based on the givenAllocator
orReallocator
, which can then in turn be used to build aPool
instance with the desired configuration.static <T extends Poolable>
PoolBuilder<T>Pool. fromInline(Allocator<T> allocator)
Get aPoolBuilder
based on the givenAllocator
orReallocator
, which can then in turn be used to build aPool
operating in the <em>inline</em> mode, with the desired configuration.static <T extends Poolable>
PoolBuilder<T>Pool. fromThreaded(Allocator<T> allocator)
Get aPoolBuilder
based on the givenAllocator
orReallocator
, which can then in turn be used to build a <em>threaded</em>Pool
instance with the desired configuration.static <T extends Poolable>
Expiration<T>Expiration. never()
Construct a new Expiration that never invalidates any objects.<X extends Poolable>
PoolBuilder<X>PoolBuilder. setAllocator(Allocator<X> allocator)
Set theAllocator
orReallocator
to use for the pools we want to configure.Methods in stormpot with parameters of type Poolable Modifier and Type Method Description void
Slot. expire(Poolable obj)
Mark the object represented by this slot as expired.void
Slot. release(Poolable obj)
Signal to the pool that the currently claimed object in this slot has been released.
-