static class TimedCachePolicy.DefaultTimedEntry extends java.lang.Object implements TimedCachePolicy.TimedEntry
| Modifier and Type | Field and Description |
|---|---|
(package private) long |
expirationTime |
(package private) java.lang.Object |
value |
| Constructor and Description |
|---|
DefaultTimedEntry(long lifetime,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Notify the entry that it has been removed from the cache.
|
java.lang.Object |
getValue() |
void |
init(long now)
Initializes an entry with the current cache time.
|
boolean |
isCurrent(long now)
Is the entry still valid basis the current time
|
boolean |
refresh()
Attempt to extend the entry lifetime by refreshing it.
|
public void init(long now)
TimedCachePolicy.TimedEntryinit in interface TimedCachePolicy.TimedEntrypublic boolean isCurrent(long now)
TimedCachePolicy.TimedEntryisCurrent in interface TimedCachePolicy.TimedEntrypublic boolean refresh()
TimedCachePolicy.TimedEntryrefresh in interface TimedCachePolicy.TimedEntrypublic void destroy()
TimedCachePolicy.TimedEntrydestroy in interface TimedCachePolicy.TimedEntrypublic java.lang.Object getValue()
getValue in interface TimedCachePolicy.TimedEntry