Package net.sf.ehcache.pool
Interface PoolParticipant
-
- All Known Implementing Classes:
PooledBasedBackEnd.PoolParticipant
public interface PoolParticipantA poolable store reports its resource usage to aPool.- Author:
- Ludovic Orban, Alex Snaps
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanevict(int count, long size)Perform eviction to release resourceslonggetApproximateCountSize()Return the approximate sizefloatgetApproximateHitRate()Return the approximate hit ratefloatgetApproximateMissRate()Return the approximate miss rate
-
-
-
Method Detail
-
evict
boolean evict(int count, long size)Perform eviction to release resources- Parameters:
count- the number of elements to evictsize- the size in bytes to free (hint)- Returns:
- true if the requested number of elements could be evicted
-
getApproximateHitRate
float getApproximateHitRate()
Return the approximate hit rate- Returns:
- the approximate hit rate
-
getApproximateMissRate
float getApproximateMissRate()
Return the approximate miss rate- Returns:
- the approximate miss rate
-
getApproximateCountSize
long getApproximateCountSize()
Return the approximate size- Returns:
- the approximate size
-
-