|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.pool.impl.AbstractBalancedAccessEvictor<T>
T
- type of store handled by this evictorpublic abstract class AbstractBalancedAccessEvictor<T>
Abstract implementation of a global 'cache value' maximizing pool eviction algorithm.
Constructor Summary | |
---|---|
AbstractBalancedAccessEvictor()
|
Method Summary | |
---|---|
protected abstract long |
byteSize(T store)
Return the size in bytes of the supplied store. |
protected abstract long |
countSize(T store)
Return the number of mappings in the supplied store. |
protected abstract boolean |
evict(T store,
int count,
long bytes)
Evict the specified number of bytes or the hinted number of elements from the specified store |
boolean |
freeSpace(Collection<T> from,
long bytes)
Free at least N bytes from a collection of resources |
protected abstract float |
hitRate(T store)
Return the hit rate for the supplied store. |
protected abstract float |
missRate(T store)
Return the miss rate for the supplied store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBalancedAccessEvictor()
Method Detail |
---|
protected abstract boolean evict(T store, int count, long bytes)
store
- store to evict fromcount
- number of elements to evictbytes
- number of bytes to evict
true
if the eviction succeededprotected abstract float hitRate(T store)
store
- store to query
protected abstract float missRate(T store)
store
- store to query
protected abstract long countSize(T store)
store
- store to size
protected abstract long byteSize(T store)
store
- store to size
public boolean freeSpace(Collection<T> from, long bytes)
freeSpace
in interface PoolEvictor<T>
from
- a collection of resources to free frombytes
- the number of bytes to free up
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |