Package net.sf.ehcache.store.cachingtier
Class PooledBasedBackEnd.PoolParticipant
- java.lang.Object
-
- net.sf.ehcache.store.cachingtier.PooledBasedBackEnd.PoolParticipant
-
- All Implemented Interfaces:
PoolParticipant
- Enclosing class:
- PooledBasedBackEnd<K,V>
public static class PooledBasedBackEnd.PoolParticipant extends java.lang.Object implements PoolParticipant
A pool participant to use with this Backend
-
-
Constructor Summary
Constructors Constructor Description PoolParticipant(PooledBasedBackEnd<java.lang.Object,java.lang.Object> pooledBasedBackEnd)Creates a pool participant
-
Method Summary
All Methods Instance Methods Concrete 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
-
-
-
Constructor Detail
-
PoolParticipant
public PoolParticipant(PooledBasedBackEnd<java.lang.Object,java.lang.Object> pooledBasedBackEnd)
Creates a pool participant- Parameters:
pooledBasedBackEnd- the backend this participant represents
-
-
Method Detail
-
evict
public boolean evict(int count, long size)Description copied from interface:PoolParticipantPerform eviction to release resources- Specified by:
evictin interfacePoolParticipant- 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
public float getApproximateHitRate()
Description copied from interface:PoolParticipantReturn the approximate hit rate- Specified by:
getApproximateHitRatein interfacePoolParticipant- Returns:
- the approximate hit rate
-
getApproximateMissRate
public float getApproximateMissRate()
Description copied from interface:PoolParticipantReturn the approximate miss rate- Specified by:
getApproximateMissRatein interfacePoolParticipant- Returns:
- the approximate miss rate
-
getApproximateCountSize
public long getApproximateCountSize()
Description copied from interface:PoolParticipantReturn the approximate size- Specified by:
getApproximateCountSizein interfacePoolParticipant- Returns:
- the approximate size
-
-