Package net.sf.ehcache.pool.impl
Class StrictlyBoundedPool
- java.lang.Object
-
- net.sf.ehcache.pool.impl.AbstractPool
-
- net.sf.ehcache.pool.impl.StrictlyBoundedPool
-
- All Implemented Interfaces:
Pool
public class StrictlyBoundedPool extends AbstractPool
A pool which strictly obeys to its bound: it will never allow the accessors to consume more bytes than what has been configured.- Author:
- Ludovic Orban, Alex Snaps
-
-
Constructor Summary
Constructors Constructor Description StrictlyBoundedPool(long maximumPoolSize, PoolEvictor evictor, SizeOfEngine defaultSizeOfEngine)Create a StrictlyBoundedPool instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PoolAccessorcreatePoolAccessor(PoolParticipant participant, SizeOfEngine sizeOfEngine)Return a PoolAccessor whose consumption is tracked by this pool, using a specific SizeOf engine.-
Methods inherited from class net.sf.ehcache.pool.impl.AbstractPool
createPoolAccessor, getEvictor, getMaxSize, getPoolAccessors, getSize, registerPoolAccessor, removePoolAccessor, setMaxSize
-
-
-
-
Constructor Detail
-
StrictlyBoundedPool
public StrictlyBoundedPool(long maximumPoolSize, PoolEvictor evictor, SizeOfEngine defaultSizeOfEngine)Create a StrictlyBoundedPool instance- Parameters:
maximumPoolSize- the maximum size of the pool, in bytes.evictor- the pool evictor, for cross-store eviction.defaultSizeOfEngine- the default SizeOf engine used by the accessors.
-
-
Method Detail
-
createPoolAccessor
public PoolAccessor createPoolAccessor(PoolParticipant participant, SizeOfEngine sizeOfEngine)
Return a PoolAccessor whose consumption is tracked by this pool, using a specific SizeOf engine.- Parameters:
participant- the participant which will use the created accessor.sizeOfEngine- the SizeOf engine used to measure the size of objects added through the created accessor.- Returns:
- a PoolAccessor whose consumption is tracked by this pool.
-
-