public class MaxAgePolicy extends Object implements RetentionPolicy<Identifier,CachedObject>
Created by Jeff Gaynor
on Nov 12, 2010 at 10:21:04 AM
Constructor and Description |
---|
MaxAgePolicy(Cache cache,
long maximumAge) |
Modifier and Type | Method and Description |
---|---|
boolean |
applies()
If this applies to the current cache.
|
Cache |
getMap()
The cache to which this policy is applied.
|
long |
getMaximumAge() |
boolean |
retain(Identifier key,
CachedObject cachedObject) |
void |
setMap(Cache map) |
void |
setMaximumAge(long maximumAge) |
public MaxAgePolicy(Cache cache, long maximumAge)
public long getMaximumAge()
public void setMaximumAge(long maximumAge)
public void setMap(Cache map)
public Cache getMap()
RetentionPolicy
getMap
in interface RetentionPolicy<Identifier,CachedObject>
public boolean retain(Identifier key, CachedObject cachedObject)
retain
in interface RetentionPolicy<Identifier,CachedObject>
public boolean applies()
RetentionPolicy
RetentionPolicy.retain(Object, Object)
method will be applied to each element of the cache. When false, this policy will be skipped.
applies
in interface RetentionPolicy<Identifier,CachedObject>
Copyright © 2019. All Rights Reserved.