Top Description Interfaces Classes Enums
module stormpot

Package stormpot


== Stormpot Stormpot is a generic, thread-safe and fast object pooling library. The object pools themselves implement the stormpot.Pool interface. The things you actually want to pool must all implement the stormpot.Poolable interface, and you must also provide an implementation of the stormpot.Allocator interface as a factory to create your pooled objects. include::docs/usage.adoc[]

Interface Summary

Modifier and TypeInterface and Description
public interface
Allocator<
any type that implements Poolable.
T extends Poolable
>

An Allocator is responsible for the creation and destruction of Poolable objects.

public interface
Completion

A Completion represents some task that is going to be completed at some point in the future, or maybe already has completed.

public interface
Expiration<T extends Poolable>

The expiration is used to determine if a given slot has expired, or otherwise become invalid.

public interface
ManagedPool

This is the JMX management interface for Stormpot object pools.

public interface
MetricsRecorder

A MetricsRecorder implementation supplies the pool with the ability to record and report operational metrics.

public interface
Poolable

Objects contained in a Pool must implement the Poolable interface and adhere to its contract.

public interface
Reallocator<
any type that implements Poolable.
T extends Poolable
>

Reallocators are a special kind of Allocator that can reallocate Poolables that have expired.

public interface
Slot

A Slot represents a location in a Pool where objects can be allocated into, so that they can be claimed and released.

public interface
SlotInfo<
The type of Poolables that this Expiration is able to examine.
T extends Poolable
>

An informative interface, used by Expiration instances to determine if a slot has expired or is still invalid for claiming.

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AllocationController<
The type of poolables to allocate or deallocate.
T extends Poolable
>

An AllocationController implements the actual allocation and deallocation of objects in a pool.

pack-priv abstract class
pack-priv class
public class
BasePoolable

A basic implementation of the Poolable interface, which can be extended directly.

pack-priv class
BlazePool<
The type of Poolable managed by this pool.
T extends Poolable
>

BlazePool is a highly optimised Pool implementation that consists of a queues of Poolable instances, the access to which is made faster with clever use of ThreadLocals.

pack-priv class
BlazePoolThreadLocalTap<
The poolable type.
T extends Poolable
>

The claim method in this pool tap follows the same idea as the thread-local caching and TLR-claiming in the pool itself.

pack-priv class
BSlot<T extends Poolable>

This class is very sensitive to the memory layout, so be careful to measure the effect of even the tiniest changes!

pack-priv class
BSlotCache<T extends Poolable>

pack-priv abstract class
pack-priv class
pack-priv class
pack-priv class
pack-priv class
pack-priv class
pack-priv class
OrExpiration<T extends Poolable>

Provides a way to compose Expirations.

pack-priv abstract class
pack-priv abstract class
pack-priv abstract class
public abstract class
Pool<
the type of Poolable contained in the pool, as determined by the configured allocator.
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.

public class
PoolBuilder<
The type of Poolable objects that a Pool based on this `PoolBuilder` will produce.
T extends Poolable
>

The `PoolBuilder` 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 the build() method.

pack-priv class
pack-priv class
public class
Pooled<T>

A reference to a pooled object.

public class
PoolException

The PoolException may be thrown by a pool implementation in a number of circumstances: * If claim is called and the pool needs to allocate a new object, but the allocation fails by returning `null` or throwing an exception.

public abstract class
PoolTap<
the type of Poolable contained in the pool, and made available via this pool tap, as determined by the configured allocator.
T extends Poolable
>

A PoolTap provides the API for accessing objects in a Pool.

pack-priv class
pack-priv class
pack-priv class
RefillPile<T extends Poolable>

A `RefillPile` can collect objects, in a concurrent and wait-free manner, before releasing them all to a queue.

pack-priv class
RefillSlot<T extends Poolable>

pack-priv class
pack-priv class
pack-priv class
pack-priv class
TimeExpiration<T extends Poolable>

This is a time based Expiration.

public class
Timeout

A Timeout represents the maximum amount of time a caller is willing to wait for a blocking operation to complete.

pack-priv class
TimeSpreadExpiration<T extends Poolable>

This is the standard time based Expiration.

pack-priv class
pack-priv class

Enum Summary

Modifier and TypeEnum and Description
pack-priv enum