public interface Cache
| Modifier and Type | Method and Description |
|---|---|
boolean |
clear()
clear all components in the cache
|
CacheItem |
get(java.lang.String key)
get a component's cached data by key
|
java.lang.String |
getDropId()
get a id of translation drop
|
long |
getExpiredTime()
get expired time
|
long |
getLastClean()
get time of last clean
|
int |
getXCapacity()
get the cache capacity
|
boolean |
isExpired()
check if the cache is expired
|
java.util.Set<java.lang.String> |
keySet()
get the set of cached keys
|
boolean |
put(java.lang.String key,
CacheItem cacheItem)
put strings to cache by key
|
boolean |
remove(java.lang.String key)
remove a component from cache by key
|
void |
setExpiredTime(long millis)
set expired time
|
void |
setLastClean(long millis)
set time of last clean
|
void |
setXCapacity(int capacityX)
set the cache's capacity by specifying the count of components
|
int |
size()
get count of current cached components
|
CacheItem get(java.lang.String key)
key - boolean put(java.lang.String key,
CacheItem cacheItem)
key - cache keycacheItem - item to be stored in the cacheboolean remove(java.lang.String key)
key - boolean clear()
int size()
java.util.Set<java.lang.String> keySet()
long getExpiredTime()
void setExpiredTime(long millis)
millis - long getLastClean()
void setLastClean(long millis)
millis - void setXCapacity(int capacityX)
capacityX - int getXCapacity()
boolean isExpired()
java.lang.String getDropId()