Class ValidTimestampPolicy
- java.lang.Object
- 
- edu.uiuc.ncsa.security.core.cache.ValidTimestampPolicy
 
- 
- All Implemented Interfaces:
- RetentionPolicy
 
 public class ValidTimestampPolicy extends Object implements RetentionPolicy The given key is overloaded to have the timestamp information. This just looks at that and parses it to make the decision.Created by Jeff Gaynor 
 on 7/12/11 at 12:26 PM
- 
- 
Field SummaryFields Modifier and Type Field Description protected longmaxTimeout
 - 
Constructor SummaryConstructors Constructor Description ValidTimestampPolicy()ValidTimestampPolicy(long maxTimeout)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplies()If this applies to the current cache.CachegetMap()This returns null, since the retention decision requires only the key of the entry, not the entire store (cf.booleanretain(Object key, Object value)
 
- 
- 
- 
Method Detail- 
appliespublic boolean applies() Description copied from interface:RetentionPolicyIf this applies to the current cache. While this is true, theRetentionPolicy.retain(Object, Object)method will be applied to each element of the cache. When false, this policy will be skipped.
 E.g. for a cache that limits the number of cached items, there is no reason to check every item in the cache directly if the cache size is below a certain threshold.- Specified by:
- appliesin interface- RetentionPolicy
- Returns:
 
 - 
retainpublic boolean retain(Object key, Object value) - Specified by:
- retainin interface- RetentionPolicy
 
 - 
getMappublic Cache getMap() This returns null, since the retention decision requires only the key of the entry, not the entire store (cf. MaxSizePolicy which does have to think about the store size.) No reason to have setters or getters.- Specified by:
- getMapin interface- RetentionPolicy
- Returns:
 
 
- 
 
-