T
- type of store that uses this poolpublic interface Pool<T>
Modifier and Type | Method and Description |
---|---|
PoolAccessor<T> |
createPoolAccessor(T store,
int maxDepth,
boolean abortWhenMaxDepthExceeded)
Return a PoolAccessor whose consumption is tracked by this pool, using a default SizeOf engine.
|
PoolAccessor<T> |
createPoolAccessor(T store,
SizeOfEngine sizeOfEngine)
Return a PoolAccessor whose consumption is tracked by this pool, using a specific SizeOf engine.
|
PoolEvictor<T> |
getEvictor()
Return the pool evictor used by this pool.
|
long |
getMaxSize()
Return the maximum size of the pool.
|
Collection<T> |
getPoolableStores()
Return the stores accessing this pool.
|
long |
getSize()
Return the used size of the pool.
|
void |
registerPoolAccessor(PoolAccessor<? extends T> 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<T> createPoolAccessor(T store, int maxDepth, boolean abortWhenMaxDepthExceeded)
store
- the store 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<? extends T> accessor)
accessor
- accessor to be registeredvoid removePoolAccessor(PoolAccessor<?> accessor)
accessor
- accessor to be removedPoolAccessor<T> createPoolAccessor(T store, SizeOfEngine sizeOfEngine)
store
- the store which will use the created accessor.sizeOfEngine
- the SizeOf engine used to measure the size of objects added through the created accessor.Collection<T> getPoolableStores()
PoolEvictor<T> getEvictor()
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.