public abstract class AbstractRecyclingExpungeStrategy extends AbstractMaxSizeExpungeStrategy
AbstractMaxSizeExpungeStrategy that triggers once the cache size is larger than a max size plus a recycle
size or a recycle factor.maxSize| Constructor and Description |
|---|
AbstractRecyclingExpungeStrategy(int maxSize,
float recycleFactor)
Constructs a new
AbstractRecyclingExpungeStrategy with the given max size and recycle factor (a value
between 0 and 1 that is the percentage of the max size to be used as the recycle size). |
AbstractRecyclingExpungeStrategy(int maxSize,
int recycleSize)
Constructs a new
AbstractRecyclingExpungeStrategy with the given max size and recycle size. |
| Modifier and Type | Method and Description |
|---|---|
int |
getRecycleSize()
Get the recycle size.
|
void |
setRecycleFactor(float recycleFactor)
Set the recycle factor (a value between 0 and 1 that is the percentage of the max size to be used as the recycle
size).
|
void |
setRecycleSize(int recycleSize)
Set the recycle size.
|
boolean |
triggers(CacheStatistics statistics)
Checks if the strategy triggers based on the given statistics.
|
getComparator, getMaxSize, getToExpungeMetaData, setMaxSizepublic AbstractRecyclingExpungeStrategy(int maxSize,
float recycleFactor)
AbstractRecyclingExpungeStrategy with the given max size and recycle factor (a value
between 0 and 1 that is the percentage of the max size to be used as the recycle size).public AbstractRecyclingExpungeStrategy(int maxSize,
int recycleSize)
AbstractRecyclingExpungeStrategy with the given max size and recycle size.public void setRecycleSize(int recycleSize)
public int getRecycleSize()
public void setRecycleFactor(float recycleFactor)
public boolean triggers(CacheStatistics statistics)
ExpungeStrategyCopyright © 2013 dontdrinkandroot. All Rights Reserved.