Package com.microstrategy.utils.cache
Class ResourceBundleCache
- java.lang.Object
-
- com.microstrategy.utils.cache.CacheBase
-
- com.microstrategy.utils.cache.CustomizationsAwareCache
-
- com.microstrategy.utils.cache.ResourceBundleCache
-
- All Implemented Interfaces:
Cache,java.util.Observer
- Direct Known Subclasses:
CustomResourceBundleCache
public class ResourceBundleCache extends CustomizationsAwareCache
- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.utils.cache.CacheBase
alias, DEFAULT_FILE_REFRESH_TIME, DEFAULT_REFRESH_TIME, DEFAULT_STATISTIC_TIME, DEFAULT_SYS_TIMEOUT, DEFAULT_USER_TIMEOUT, NO_KEY, NO_REFRESH, NO_STATISTIC, NO_TIMEOUT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourceBundleCache(java.lang.String cacheName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.ResourceBundlegetBundle(java.lang.String baseName)Gets a resource bundle using the specified base name and default locale.static java.util.ResourceBundlegetBundle(java.lang.String baseName, java.util.Locale locale)Gets a resource bundle using the specified base name and locale.static ResourceBundleCachegetInstance()protected java.lang.ObjectgetKey(CacheHint hint)Overridable.protected java.lang.Objectload(CacheHint hint)Overridable.-
Methods inherited from class com.microstrategy.utils.cache.CustomizationsAwareCache
update
-
Methods inherited from class com.microstrategy.utils.cache.CacheBase
canUpdate, clear, close, configure, contains, delete, get, getName, getRefreshTime, getStatisticTime, getTimeout, getWithoutRefresh, logStatistic, onHintClose, onTimer, put, refresh, reLoad, remove, save, setRefreshTime, setStatisticTime, setTimeout, size, store, unLoad
-
-
-
-
Method Detail
-
getInstance
public static ResourceBundleCache getInstance()
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName)
Gets a resource bundle using the specified base name and default locale.- Parameters:
baseName- the base name of the resource bundle, a fully qualified class name- Returns:
- a resource bundle for the given base name.
-
getBundle
public static java.util.ResourceBundle getBundle(java.lang.String baseName, java.util.Locale locale)Gets a resource bundle using the specified base name and locale.- Parameters:
baseName- the base name of the resource bundle, a fully qualified class namelocale- the locale for which a resource bundle is desired- Returns:
- a resource bundle for the given base name and locale.
-
load
protected java.lang.Object load(CacheHint hint) throws CacheException
Description copied from class:CacheBaseOverridable. Creates a new cached object instance and populates it with data from the persistent storage. In case the object not found in the persistent storage the implementation can return either null or a dummy object.- Specified by:
loadin classCacheBase- Parameters:
hint- the hint object.- Returns:
- the object or null.
- Throws:
CacheException- if somethig gos wrong.
-
getKey
protected java.lang.Object getKey(CacheHint hint) throws CacheException
Description copied from class:CacheBaseOverridable. Extracts from the hint object the key that shall be used to identify the cached object.- Specified by:
getKeyin classCacheBase- Parameters:
hint- the hint object.- Returns:
- the key
- Throws:
CacheException- if somethig gos wrong.
-
-