Top Description Constructors Methods
net.sf.ehcache.pool.impl

public Class StrictlyBoundedPool

extends AbstractPool
Class Inheritance
Imports
net.sf.ehcache.pool.PoolAccessor, .PoolEvictor, .PoolParticipant, .SizeOfEngine

A pool which strictly obeys to its bound: it will never allow the accessors to consume more bytes than what has been configured.
Authors
Ludovic Orban, Alex Snaps

Constructor Summary

AccessConstructor and Description
public
StrictlyBoundedPool(long
the maximum size of the pool, in bytes.
maximumPoolSize
,
PoolEvictor<T extends PoolParticipant>
the pool evictor, for cross-store eviction.
evictor
,
SizeOfEngine
the default SizeOf engine used by the accessors.
defaultSizeOfEngine
)

Create a StrictlyBoundedPool instance

Method Summary

Modifier and TypeMethod and Description
public PoolAccessor<T extends PoolParticipant>
createPoolAccessor(PoolParticipant
the participant which will use the created accessor.
participant
,
SizeOfEngine
the SizeOf engine used to measure the size of objects added through the created accessor.
sizeOfEngine
)

Implements net.sf.ehcache.pool.Pool.createPoolAccessor.

Return a PoolAccessor whose consumption is tracked by this pool, using a specific SizeOf engine.
Inherited from net.sf.ehcache.pool.impl.AbstractPool:
createPoolAccessorgetEvictorgetMaxSizegetPoolAccessorsgetSizeregisterPoolAccessorremovePoolAccessorsetMaxSize

Constructor Detail

StrictlyBoundedPoolback to summary
public StrictlyBoundedPool(long maximumPoolSize, PoolEvictor<T extends PoolParticipant> evictor, SizeOfEngine defaultSizeOfEngine)

Create a StrictlyBoundedPool instance

Parameters
maximumPoolSize:long

the maximum size of the pool, in bytes.

evictor:PoolEvictor<T extends PoolParticipant>

the pool evictor, for cross-store eviction.

defaultSizeOfEngine:SizeOfEngine

the default SizeOf engine used by the accessors.

Method Detail

createPoolAccessorback to summary
public PoolAccessor<T extends PoolParticipant> createPoolAccessor(PoolParticipant participant, SizeOfEngine sizeOfEngine)

Implements net.sf.ehcache.pool.Pool.createPoolAccessor.

Doc from net.sf.ehcache.pool.Pool.createPoolAccessor.

Return a PoolAccessor whose consumption is tracked by this pool, using a specific SizeOf engine.

Parameters
participant:PoolParticipant

the participant which will use the created accessor.

sizeOfEngine:SizeOfEngine

the SizeOf engine used to measure the size of objects added through the created accessor.

Returns:PoolAccessor<T extends PoolParticipant>

a PoolAccessor whose consumption is tracked by this pool.