public interface

CacheHint

com.microstrategy.utils.cache.CacheHint
Known Indirect Subclasses

Class Overview

Every item stored in the cache is keyed by a CacheHint. Its primary role is to provide the cache state id property (see getCacheStateId(String)), which is used to maintain coherency across caches with the same name across multiple JVMs (e.g. caches in a web cluster).

Summary

Fields
public static final Long ZERO_STATE_ID
Public Methods
abstract Long getCacheStateId(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
abstract void setCacheStateId(String name, Long stateId)
Sets the stateId - see getCacheStateId(String).

Fields

public static final Long ZERO_STATE_ID

Public Methods

public abstract Long getCacheStateId (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

public abstract void setCacheStateId (String name, Long stateId)

Sets the stateId - see getCacheStateId(String).

Parameters
name cache name
stateId new cache state id