Package com.microstrategy.webapi
Class RepositorySettingsCache
- java.lang.Object
-
- com.microstrategy.utils.cache.CacheBase
-
- com.microstrategy.webapi.RepositorySettingsCache
-
-
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 protected
RepositorySettingsCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
get(CacheHint hint)
get
returns an unexpired cache value.static RepositorySettingsCache
getInstance()
protected java.lang.Object
getKey(CacheHint hint)
Overridable.java.util.Map<java.lang.String,java.lang.String>
getSettings(WebIServerSession session)
java.util.Map<java.lang.String,java.lang.String>
getSettings(java.lang.String serverName, int port)
protected java.lang.Object
load(CacheHint hint)
Overridable.-
Methods inherited from class com.microstrategy.utils.cache.CacheBase
canUpdate, clear, close, configure, contains, delete, getName, getRefreshTime, getStatisticTime, getTimeout, getWithoutRefresh, logStatistic, onHintClose, onTimer, put, refresh, reLoad, remove, save, setRefreshTime, setStatisticTime, setTimeout, size, store, unLoad
-
-
-
-
Method Detail
-
getInstance
public static RepositorySettingsCache getInstance()
-
getKey
protected java.lang.Object getKey(CacheHint hint) throws CacheException
Description copied from class:CacheBase
Overridable. Extracts from the hint object the key that shall be used to identify the cached object.- Specified by:
getKey
in classCacheBase
- Parameters:
hint
- the hint object.- Returns:
- the key
- Throws:
CacheException
- if somethig gos wrong.
-
load
protected java.lang.Object load(CacheHint hint) throws CacheException
Description copied from class:CacheBase
Overridable. 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:
load
in classCacheBase
- Parameters:
hint
- the hint object.- Returns:
- the object or null.
- Throws:
CacheException
- if somethig gos wrong.
-
get
public java.util.Map<java.lang.String,java.lang.String> get(CacheHint hint) throws CacheException
Description copied from class:CacheBase
get
returns an unexpired cache value. If the cache was expired at the time of the call, then the cache is refreshed. If the cache was unexpired at the time of the call, then the cache value is used (without any need to refresh the cache). If the cache cannot be refreshed, then a CacheExceptin is thrown. null may be returned if the hint cannot be resolved.- Specified by:
get
in interfaceCache
- Overrides:
get
in classCacheBase
- Parameters:
hint
- the hint object.- Returns:
- the unexpired cache or null
- Throws:
CacheException
- when the cache cannot be refreshed
-
getSettings
public java.util.Map<java.lang.String,java.lang.String> getSettings(java.lang.String serverName, int port) throws CacheException
- Throws:
CacheException
-
getSettings
public java.util.Map<java.lang.String,java.lang.String> getSettings(WebIServerSession session) throws CacheException
- Throws:
CacheException
-
-