|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.pool.impl.AbstractPool
public abstract class AbstractPool
An abstract pool implementation.
This contains all the logic of a pool except for the actual creation of accessor instances.
Constructor Summary | |
---|---|
AbstractPool(long maximumPoolSize,
PoolEvictor evictor,
SizeOfEngine defaultSizeOfEngine)
Create an AbstractPool instance |
Method Summary | |
---|---|
PoolAccessor |
createPoolAccessor(PoolParticipant participant,
int maxDepth,
boolean abortWhenMaxDepthExceeded)
Return a PoolAccessor whose consumption is tracked by this pool, using a default SizeOf engine. |
PoolEvictor |
getEvictor()
Return the pool evictor used by this pool. |
long |
getMaxSize()
Return the maximum size of the pool. |
Collection<PoolAccessor> |
getPoolAccessors()
Return the participants accessing this pool. |
long |
getSize()
Return the used size of the pool. |
void |
registerPoolAccessor(PoolAccessor accessor)
Register an accessor implementation with this pool. |
void |
removePoolAccessor(PoolAccessor accessor)
Remove the supplied accessor from this pool. |
void |
setMaxSize(long newSize)
Change the maximum size of the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.ehcache.pool.Pool |
---|
createPoolAccessor |
Constructor Detail |
---|
public AbstractPool(long maximumPoolSize, PoolEvictor evictor, SizeOfEngine defaultSizeOfEngine)
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 |
---|
public long getSize()
getSize
in interface Pool
public long getMaxSize()
getMaxSize
in interface Pool
public void setMaxSize(long newSize)
setMaxSize
in interface Pool
newSize
- the new pool size.public PoolAccessor createPoolAccessor(PoolParticipant participant, int maxDepth, boolean abortWhenMaxDepthExceeded)
createPoolAccessor
in interface Pool
participant
- the participant which will use the created accessor.maxDepth
- maximum depth of the object graph to traverseabortWhenMaxDepthExceeded
- true if the object traversal should be aborted when the max depth is exceeded
public void registerPoolAccessor(PoolAccessor accessor)
registerPoolAccessor
in interface Pool
accessor
- accessor to be registeredpublic void removePoolAccessor(PoolAccessor accessor)
removePoolAccessor
in interface Pool
accessor
- accessor to be removedpublic Collection<PoolAccessor> getPoolAccessors()
getPoolAccessors
in interface Pool
public PoolEvictor getEvictor()
getEvictor
in interface Pool
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |