|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxsmart.ic.util.ExpirableCache
public class ExpirableCache
This class provides a cache where each element can be expired after a period of time. It is up to the caller to provide a unique key that isn't used by anybody else in the application.
| Method Summary | |
|---|---|
static void |
add(java.lang.String key,
java.lang.Object cacheEntry,
java.lang.Integer timeoutSecs)
Adds an entry into the cache using a specified key. |
static java.lang.Object |
get(java.lang.String key)
Gets an item in the cache. |
static boolean |
isCached(java.lang.String key)
Returns whether an item with the specified key is currently in the cache. |
static java.lang.Object |
remove(java.lang.String key)
Removes an item from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void add(java.lang.String key,
java.lang.Object cacheEntry,
java.lang.Integer timeoutSecs)
key - The key into the cachecacheEntry - The cached entrytimeoutSecs - An optional timeout value in seconds. If null, the item is not timed out.public static boolean isCached(java.lang.String key)
key - The key into the cache
public static java.lang.Object get(java.lang.String key)
key - The key into the cache
public static java.lang.Object remove(java.lang.String key)
key - The key of the item in the cache to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||