ehcache

net.sf.ehcache.pool.impl
Class BoundedPool

java.lang.Object
  extended by net.sf.ehcache.pool.impl.AbstractPool
      extended by net.sf.ehcache.pool.impl.BoundedPool
All Implemented Interfaces:
Pool

public class BoundedPool
extends AbstractPool

A pool which loosely obeys to its bound: it can allow the accessors to consume more bytes than what has been configured if that helps concurrency.

Author:
Ludovic Orban, Chris Dennis

Constructor Summary
BoundedPool(long maximumPoolSize, PoolEvictor evictor, SizeOfEngine defaultSizeOfEngine)
          Create a BoundedPool instance
 
Method Summary
 PoolAccessor createPoolAccessor(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundedPool

public BoundedPool(long maximumPoolSize,
                   PoolEvictor evictor,
                   SizeOfEngine defaultSizeOfEngine)
Create a BoundedPool 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.

ehcache

Copyright 2001-2017, Terracotta, Inc.