|
GWTP Dispatch client 0.6-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gwtplatform.dispatch.client.actionhandler.caching.DefaultCacheImpl
public class DefaultCacheImpl
Default Implementation for Cache
.
Constructor Summary | |
---|---|
DefaultCacheImpl()
Initializes the cache with auto expiration OFF. |
|
DefaultCacheImpl(long autoExpireTimeInMs)
Initialize the cache with auto expiration ON. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCacheImpl()
public DefaultCacheImpl(long autoExpireTimeInMs)
autoExpireTimeInMs
- Time in milliseconds after which entries in cache expireMethod Detail |
---|
public void clear()
Cache
clear
in interface Cache
public Object get(Object key)
Cache
get
in interface Cache
key
- The key for the cached entry
public void put(Object key, Object value)
Cache
Cache.getAutoExpireTimeInMs()
milliseconds.
put
in interface Cache
key
- The key for the entry to be cachedvalue
- The corresponding valuepublic void remove(Object key)
Cache
remove
in interface Cache
key
- The key for the cached entrypublic long getLastUpateTime(Object key)
Cache
getLastUpateTime
in interface Cache
key
- The key for which last update time is required
public long getAutoExpireTimeInMs()
getAutoExpireTimeInMs
in interface Cache
public void setAutoExpireTimeInMs(long autoExpireTimeInMs)
Cache
setAutoExpireTimeInMs
in interface Cache
autoExpireTimeInMs
- The auto expiry time in milliseconds
|
GWTP Dispatch client 0.6-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |