public abstract class AbstractFromLargestCachePoolEvictor extends Object implements PoolEvictor<PoolableStore>
Constructor and Description |
---|
AbstractFromLargestCachePoolEvictor() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
evict(int count,
long bytes,
PoolableStore poolableStore)
Evict from a store for a chosen resource
|
boolean |
freeSpace(Collection<PoolableStore> from,
long bytes)
Free at least N bytes from a collection of resources
|
protected abstract long |
getSizeInBytes(PoolableStore poolableStore)
Get a store size in bytes for a chosen resource
|
public boolean freeSpace(Collection<PoolableStore> from, long bytes)
freeSpace
in interface PoolEvictor<PoolableStore>
from
- a collection of resources to free frombytes
- the number of bytes to free upprotected abstract boolean evict(int count, long bytes, PoolableStore poolableStore)
count
- the element countbytes
- the bytes countpoolableStore
- the storeprotected abstract long getSizeInBytes(PoolableStore poolableStore)
poolableStore
- the storeCopyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.