|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- type of the store that uses this accessorpublic interface PoolAccessor<T>
PoolAccessors are used by stores to tell the pools about their resource consumption
Method Summary | |
---|---|
long |
add(Object key,
Object value,
Object container,
boolean force)
Add an element to the pool. |
boolean |
canAddWithoutEvicting(Object key,
Object value,
Object container)
Check if there is enough room in the pool to add an element without provoking any eviction |
void |
clear()
Free resources used by this accessor. |
long |
delete(long size)
Delete a fixed number of bytes from the pool. |
long |
getSize()
Return how many bytes this accessor consumes from the pool. |
T |
getStore()
Return the store that uses this accessor |
boolean |
hasAbortedSizeOf()
Check if the store may contain elements which the SizeOf engine could not fully size. |
long |
replace(long currentSize,
Object key,
Object value,
Object container,
boolean force)
Delete a fixed number of bytes from the pool with the given objects. |
void |
setMaxSize(long newValue)
Sets the max size for this pool |
void |
unlink()
unlink this PoolAccessor from its pool. |
Method Detail |
---|
long add(Object key, Object value, Object container, boolean force)
key
- the key of the elementvalue
- the value of the elementcontainer
- the element-container objectforce
- true if the pool should accept adding the element, even if it's out of resources
boolean canAddWithoutEvicting(Object key, Object value, Object container)
key
- the key of the elementvalue
- the value of the elementcontainer
- the element-container object
long delete(long size)
size
- number of bytes
long replace(long currentSize, Object key, Object value, Object container, boolean force)
currentSize
- the size of the object(s) being replacedkey
- the key of the elementvalue
- the value of the elementcontainer
- the element-container objectforce
- true if the pool should accept replacing the element, even if it's out of resources
long getSize()
void unlink()
void clear()
T getStore()
void setMaxSize(long newValue)
newValue
- the value in bytesboolean hasAbortedSizeOf()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |