Class MessageCache
- java.lang.Object
-
- com.vmware.vipclient.i18n.base.cache.MessageCache
-
-
Constructor Summary
Constructors Constructor Description MessageCache()MessageCache(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanclear()clear all components in the cacheCacheItemget(java.lang.String cacheKey)get a component's cached data by keyintgetCachedKeySize()java.util.Map<java.lang.String,MessageCacheItem>getCachedTranslationMap()intgetCapacityByKey()java.lang.StringgetDropId()get a id of translation droplonggetExpiredTime()get expired timejava.util.Map<java.lang.String,java.lang.Integer>getHitMap()java.lang.StringgetId()longgetLastClean()get time of last cleanjava.lang.StringgetRemovedKeyFromHitMap()intgetXCapacity()get the cache capacitybooleanisExpired()Deprecated.Use theisExpiredmethod.booleanisFull()java.util.Set<java.lang.String>keySet()get the set of cached keysbooleanput(java.lang.String cacheKey, CacheItem itemToCache)put strings to cache by keybooleanremove(java.lang.String cacheKey)remove a component from cache by keyvoidsetCapacityByKey(int capacityByKey)voidsetDropId(java.lang.String dropId)voidsetExpiredTime(long millis)set expired timevoidsetId(java.lang.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
-
-
-
Method Detail
-
getCachedTranslationMap
public java.util.Map<java.lang.String,MessageCacheItem> getCachedTranslationMap()
-
getHitMap
public java.util.Map<java.lang.String,java.lang.Integer> getHitMap()
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
get
public CacheItem get(java.lang.String cacheKey)
Description copied from interface:Cacheget a component's cached data by key
-
getRemovedKeyFromHitMap
public java.lang.String getRemovedKeyFromHitMap()
-
put
public boolean put(java.lang.String cacheKey, CacheItem itemToCache)Description copied from interface:Cacheput strings to cache by key
-
remove
public boolean remove(java.lang.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 java.util.Set<java.lang.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 java.lang.String getDropId()
Description copied from interface:Cacheget a id of translation drop
-
setDropId
public void setDropId(java.lang.String dropId)
-
-