public interface Pool
Modifier and Type | Method and Description |
---|---|
PoolAccessor |
createPoolAccessor(PoolParticipant participant,
int maxDepth,
boolean abortWhenMaxDepthExceeded)
Return a PoolAccessor whose consumption is tracked by this pool, using a default SizeOf engine.
|
PoolAccessor |
createPoolAccessor(PoolParticipant participant,
SizeOfEngine sizeOfEngine)
Return a PoolAccessor whose consumption is tracked by this pool, using a specific 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.
|
long getSize()
long getMaxSize()
void setMaxSize(long newSize)
newSize
- the new pool size.PoolAccessor createPoolAccessor(PoolParticipant participant, int maxDepth, boolean abortWhenMaxDepthExceeded)
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 exceededvoid registerPoolAccessor(PoolAccessor accessor)
accessor
- accessor to be registeredvoid removePoolAccessor(PoolAccessor accessor)
accessor
- accessor to be removedPoolAccessor createPoolAccessor(PoolParticipant participant, SizeOfEngine sizeOfEngine)
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.Collection<PoolAccessor> getPoolAccessors()
PoolEvictor getEvictor()
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.