Class MessageCache
- java.lang.Object
-
- com.vmware.vipclient.i18n.base.cache.MessageCache
-
-
Constructor Summary
Constructors Constructor Description MessageCache()MessageCache(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanclear()clear all components in the cacheCacheItemget(String cacheKey)get a component's cached data by keyintgetCachedKeySize()Map<String,MessageCacheItem>getCachedTranslationMap()intgetCapacityByKey()StringgetDropId()get a id of translation droplonggetExpiredTime()get expired timeMap<String,Integer>getHitMap()StringgetId()longgetLastClean()get time of last cleanStringgetRemovedKeyFromHitMap()intgetXCapacity()get the cache capacitybooleanisExpired()Deprecated.Use theisExpiredmethod.booleanisFull()Set<String>keySet()get the set of cached keysbooleanput(String cacheKey, CacheItem itemToCache)put strings to cache by keybooleanremove(String cacheKey)remove a component from cache by keyvoidsetCapacityByKey(int capacityByKey)voidsetDropId(String dropId)voidsetExpiredTime(long millis)set expired timevoidsetId(String id)voidsetLastClean(long millis)set time of last cleanvoidsetXCapacity(int capacityX)set the cache's capacity by specifying the count of componentsintsize()get count of current cached components
-
-
-
Constructor Detail
-
MessageCache
public MessageCache()
-
MessageCache
public MessageCache(String id)
-
-
Method Detail
-
getCachedTranslationMap
public Map<String,MessageCacheItem> getCachedTranslationMap()
-
getId
public String getId()
-
setId
public void setId(String id)
-
get
public CacheItem get(String cacheKey)
Description copied from interface:Cacheget a component's cached data by key
-
getRemovedKeyFromHitMap
public String getRemovedKeyFromHitMap()
-
put
public boolean put(String cacheKey, CacheItem itemToCache)
Description copied from interface:Cacheput strings to cache by key
-
remove
public boolean remove(String cacheKey)
Description copied from interface:Cacheremove a component from cache by key
-
clear
public boolean clear()
Description copied from interface:Cacheclear all components in the cache
-
size
public int size()
Description copied from interface:Cacheget count of current cached components
-
keySet
public Set<String> keySet()
Description copied from interface:Cacheget the set of cached keys
-
getExpiredTime
public long getExpiredTime()
Description copied from interface:Cacheget expired time- Specified by:
getExpiredTimein interfaceCache- Returns:
- long time
-
setExpiredTime
public void setExpiredTime(long millis)
Description copied from interface:Cacheset expired time- Specified by:
setExpiredTimein interfaceCache
-
getLastClean
public long getLastClean()
Description copied from interface:Cacheget time of last clean- Specified by:
getLastCleanin interfaceCache- Returns:
- long time
-
setLastClean
public void setLastClean(long millis)
Description copied from interface:Cacheset time of last clean- Specified by:
setLastCleanin interfaceCache
-
getCachedKeySize
public int getCachedKeySize()
-
setCapacityByKey
public void setCapacityByKey(int capacityByKey)
-
getCapacityByKey
public int getCapacityByKey()
-
setXCapacity
public void setXCapacity(int capacityX)
Description copied from interface:Cacheset the cache's capacity by specifying the count of components- Specified by:
setXCapacityin interfaceCache
-
getXCapacity
public int getXCapacity()
Description copied from interface:Cacheget the cache capacity- Specified by:
getXCapacityin interfaceCache- Returns:
- cache capacity
-
isFull
public boolean isFull()
-
isExpired
public boolean isExpired()
Deprecated.Use theisExpiredmethod.
-
getDropId
public String getDropId()
Description copied from interface:Cacheget a id of translation drop
-
setDropId
public void setDropId(String dropId)
-
-