public class ValidTimestampPolicy extends Object implements RetentionPolicy
Created by Jeff Gaynor
on 7/12/11 at 12:26 PM
Modifier and Type | Field and Description |
---|---|
protected long |
maxTimeout |
Constructor and Description |
---|
ValidTimestampPolicy() |
ValidTimestampPolicy(long maxTimeout) |
Modifier and Type | Method and Description |
---|---|
boolean |
applies()
If this applies to the current cache.
|
Cache |
getMap()
This returns null, since the retention decision requires only the key of the entry,
not the entire store (cf.
|
boolean |
retain(Object key,
Object value) |
public ValidTimestampPolicy(long maxTimeout)
public ValidTimestampPolicy()
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
public boolean retain(Object key, Object value)
retain
in interface RetentionPolicy
public Cache getMap()
getMap
in interface RetentionPolicy
Copyright © 2019. All Rights Reserved.