public interface Cache
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the entire cache.
|
Object |
get(Object key)
Returns the cached value corresponding to key.
|
long |
getAutoExpireTimeInMs() |
long |
getLastUpateTime(Object key)
Returns the last update time in milliseconds since January 1, 1970, 00:00:00 GMT for the cached entry.
|
void |
put(Object key,
Object value)
Puts the key-value pair in the cache.
|
void |
remove(Object key)
Removes the entry from the cache.
|
void |
setAutoExpireTimeInMs(long autoExpireTimeInMs)
Set the auto expiry time, after which an entry will expire after it is put in cache.
|
void put(Object key, Object value)
getAutoExpireTimeInMs()
milliseconds.key
- The key for the entry to be cachedvalue
- The corresponding valuelong getAutoExpireTimeInMs()
void setAutoExpireTimeInMs(long autoExpireTimeInMs)
autoExpireTimeInMs
- The auto expiry time in millisecondsObject get(Object key)
key
- The key for the cached entryvoid clear()
void remove(Object key)
key
- The key for the cached entrylong getLastUpateTime(Object key)
key
- The key for which last update time is requiredCopyright © 2010-2014 ArcBees. All Rights Reserved.