ehcache

net.sf.ehcache.store.cachingtier
Class PooledBasedBackEnd.PoolParticipant

java.lang.Object
  extended by net.sf.ehcache.store.cachingtier.PooledBasedBackEnd.PoolParticipant
All Implemented Interfaces:
PoolParticipant
Enclosing class:
PooledBasedBackEnd<K,V>

public static class PooledBasedBackEnd.PoolParticipant
extends Object
implements PoolParticipant

A pool participant to use with this Backend


Constructor Summary
PooledBasedBackEnd.PoolParticipant(PooledBasedBackEnd<Object,Object> pooledBasedBackEnd)
          Creates a pool participant
 
Method Summary
 boolean evict(int count, long size)
          Perform eviction to release resources
 long getApproximateCountSize()
          Return the approximate size
 float getApproximateHitRate()
          Return the approximate hit rate
 float getApproximateMissRate()
          Return the approximate miss rate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PooledBasedBackEnd.PoolParticipant

public PooledBasedBackEnd.PoolParticipant(PooledBasedBackEnd<Object,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: PoolParticipant
Perform eviction to release resources

Specified by:
evict in interface PoolParticipant
Parameters:
count - the number of elements to evict
size - 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: PoolParticipant
Return the approximate hit rate

Specified by:
getApproximateHitRate in interface PoolParticipant
Returns:
the approximate hit rate

getApproximateMissRate

public float getApproximateMissRate()
Description copied from interface: PoolParticipant
Return the approximate miss rate

Specified by:
getApproximateMissRate in interface PoolParticipant
Returns:
the approximate miss rate

getApproximateCountSize

public long getApproximateCountSize()
Description copied from interface: PoolParticipant
Return the approximate size

Specified by:
getApproximateCountSize in interface PoolParticipant
Returns:
the approximate size

ehcache

Copyright 2001-2015, Terracotta, Inc.