| 构造器和说明 |
|---|
MessageCache() |
MessageCache(java.lang.String id) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
clear()
clear all components in the cache
|
CacheItem |
get(java.lang.String cacheKey)
get a component's cached data by key
|
int |
getCachedKeySize() |
java.util.Map<java.lang.String,MessageCacheItem> |
getCachedTranslationMap() |
int |
getCapacityByKey() |
java.lang.String |
getDropId()
get a id of translation drop
|
long |
getExpiredTime()
get expired time
|
java.util.Map<java.lang.String,java.lang.Integer> |
getHitMap() |
java.lang.String |
getId() |
long |
getLastClean()
get time of last clean
|
java.lang.String |
getRemovedKeyFromHitMap() |
int |
getXCapacity()
get the cache capacity
|
boolean |
isExpired()
已过时。
Use the
isExpired method. |
boolean |
isFull() |
java.util.Set<java.lang.String> |
keySet()
get the set of cached keys
|
boolean |
put(java.lang.String cacheKey,
CacheItem itemToCache)
put strings to cache by key
|
boolean |
remove(java.lang.String cacheKey)
remove a component from cache by key
|
void |
setCapacityByKey(int capacityByKey) |
void |
setDropId(java.lang.String dropId) |
void |
setExpiredTime(long millis)
set expired time
|
void |
setId(java.lang.String id) |
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
|
public java.util.Map<java.lang.String,MessageCacheItem> getCachedTranslationMap()
public java.util.Map<java.lang.String,java.lang.Integer> getHitMap()
public java.lang.String getId()
public void setId(java.lang.String id)
public CacheItem get(java.lang.String cacheKey)
Cachepublic java.lang.String getRemovedKeyFromHitMap()
public boolean put(java.lang.String cacheKey,
CacheItem itemToCache)
Cachepublic boolean remove(java.lang.String cacheKey)
Cachepublic boolean clear()
Cachepublic int size()
Cachepublic java.util.Set<java.lang.String> keySet()
Cachepublic long getExpiredTime()
CachegetExpiredTime 在接口中 Cachepublic void setExpiredTime(long millis)
CachesetExpiredTime 在接口中 Cachepublic long getLastClean()
CachegetLastClean 在接口中 Cachepublic void setLastClean(long millis)
CachesetLastClean 在接口中 Cachepublic int getCachedKeySize()
public void setCapacityByKey(int capacityByKey)
public int getCapacityByKey()
public void setXCapacity(int capacityX)
CachesetXCapacity 在接口中 Cachepublic int getXCapacity()
CachegetXCapacity 在接口中 Cachepublic boolean isFull()
public java.lang.String getDropId()
Cachepublic void setDropId(java.lang.String dropId)