Package com.microstrategy.utils.cache
Interface CacheHint
-
- All Known Subinterfaces:
ServerInfo
,WebCluster
,WebIServerSession
,WebSessionInfo
- All Known Implementing Classes:
AbstractLayoutSource.LayoutCacheHint
,ClientSideLayoutCacheHint
,ConfigurationFilesCache.ConfigurationFileCacheHint
,EsriWebMapHint
,MSIRefreshClusterMembershipCache.RCMKey
,ResourceCacheHint
,SimpleHint
,SysDefaultPrefType
,SysPrefType
public interface CacheHint
Every item stored in the cache is keyed by aCacheHint
. Its primary role is to provide the cache state id property (seegetCacheStateId(String)
), which is used to maintain coherency across caches with the same name across multiple JVMs (e.g. caches in a web cluster).- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Long
ZERO_STATE_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Long
getCacheStateId(java.lang.String name)
Returns a value for the current state of the cache hint This value is used in maintaining cache consistency across different caches using the same hint object (for instance, session based cache across a web cluster where each machine in the cluster holds a copy of the cache) Whenever a change is made to the cached value in one cache, the stateId is incrementedvoid
setCacheStateId(java.lang.String name, java.lang.Long stateId)
Sets the stateId - seegetCacheStateId(String)
.
-
-
-
Method Detail
-
getCacheStateId
java.lang.Long getCacheStateId(java.lang.String name)
Returns a value for the current state of the cache hint This value is used in maintaining cache consistency across different caches using the same hint object (for instance, session based cache across a web cluster where each machine in the cluster holds a copy of the cache) Whenever a change is made to the cached value in one cache, the stateId is incremented- Parameters:
name
- cache name- Returns:
- current state of the cache hint
-
setCacheStateId
void setCacheStateId(java.lang.String name, java.lang.Long stateId)
Sets the stateId - seegetCacheStateId(String)
.- Parameters:
name
- cache namestateId
- new cache state id
-
-