V - public class PspDatedCacheElement<V> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
storedTime_ms |
protected V |
value |
| Constructor and Description |
|---|
PspDatedCacheElement(V value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Only compares CacheElements based on the value and not the date they were cached.
|
V |
getValue() |
V |
getValueIfNewEnough(org.joda.time.DateTime oldestAllowedAge)
Get the value if it is new enough
|
V |
getValueIfNewEnough(long oldestAllowedAge_ms)
Get the value if it is new enough.
|
int |
hashCode() |
boolean |
isNewEnough(org.joda.time.DateTime oldestAllowedAge) |
boolean |
isNewEnough(long oldestAllowedAge_ms) |
boolean |
isOlderThan(org.joda.time.DateTime aDate) |
boolean |
isOlderThan(long time_ms) |
protected long storedTime_ms
protected V value
public PspDatedCacheElement(V value)
public boolean isNewEnough(org.joda.time.DateTime oldestAllowedAge)
public boolean isNewEnough(long oldestAllowedAge_ms)
public boolean isOlderThan(org.joda.time.DateTime aDate)
public boolean isOlderThan(long time_ms)
public V getValue()
public V getValueIfNewEnough(org.joda.time.DateTime oldestAllowedAge)
oldestAllowedAge - the date you require the object to be fresher than.
Null means to bypass age checks and always return the object.public V getValueIfNewEnough(long oldestAllowedAge_ms)
oldestAllowedAge_ms - the java epoch that you wish the object to be
fresher than. <=0 means to bypass age checks and
always return the object.public boolean equals(Object o)
Copyright © 2022 Internet2. All rights reserved.