ehcache

net.sf.ehcache.pool.impl
Class FromLargestCachePoolEvictor

java.lang.Object
  extended by net.sf.ehcache.pool.impl.FromLargestCachePoolEvictor
All Implemented Interfaces:
PoolEvictor<PoolParticipant>

public class FromLargestCachePoolEvictor
extends Object
implements PoolEvictor<PoolParticipant>

Abstract pool evictor which always evicts from the store consuming the most resources.

Author:
Ludovic Orban, Alex Snaps

Constructor Summary
FromLargestCachePoolEvictor()
           
 
Method Summary
 boolean freeSpace(Collection<PoolAccessor<PoolParticipant>> from, long bytes)
          Free at least N bytes from a collection of resources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FromLargestCachePoolEvictor

public FromLargestCachePoolEvictor()
Method Detail

freeSpace

public boolean freeSpace(Collection<PoolAccessor<PoolParticipant>> from,
                         long bytes)
Free at least N bytes from a collection of resources

Specified by:
freeSpace in interface PoolEvictor<PoolParticipant>
Parameters:
from - a collection of resources to free from
bytes - the number of bytes to free up
Returns:
true if at least N bytes could be freed

ehcache

Copyright 2001-2014, Terracotta, Inc.