net.sf.ehcache.pool.impl
Class FromLargestCacheOnDiskPoolEvictor
java.lang.Object
net.sf.ehcache.pool.impl.AbstractFromLargestCachePoolEvictor
net.sf.ehcache.pool.impl.FromLargestCacheOnDiskPoolEvictor
- All Implemented Interfaces:
- PoolEvictor<PoolableStore>
public class FromLargestCacheOnDiskPoolEvictor
- extends AbstractFromLargestCachePoolEvictor
Pool evictor which always evicts from the store consuming the most disk resources.
- Author:
- Ludovic Orban
Method Summary |
protected boolean |
evict(int count,
long bytes,
PoolableStore largestPoolableStore)
Evict from a store for a chosen resource |
protected long |
getSizeInBytes(PoolableStore largestPoolableStore)
Get a store size in bytes for a chosen resource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FromLargestCacheOnDiskPoolEvictor
public FromLargestCacheOnDiskPoolEvictor()
evict
protected boolean evict(int count,
long bytes,
PoolableStore largestPoolableStore)
- Evict from a store for a chosen resource
- Specified by:
evict
in class AbstractFromLargestCachePoolEvictor
- Parameters:
count
- the element countbytes
- the bytes countlargestPoolableStore
- the store
- Returns:
- true if eviction succeeded, ie: if there was enough evictable resource held by the store
getSizeInBytes
protected long getSizeInBytes(PoolableStore largestPoolableStore)
- Get a store size in bytes for a chosen resource
- Specified by:
getSizeInBytes
in class AbstractFromLargestCachePoolEvictor
- Parameters:
largestPoolableStore
- the store
- Returns:
- the size in bytes
Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.