public class

SimpleHint

extends Object
implements CacheHint
java.lang.Object
   ↳ com.microstrategy.utils.cache.SimpleHint
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

SimpleHint is an implementation of the CacheHint interface. It maintains a Map of cache state IDs keyed by cache names, and provides methods to save and restore this class (see getState() and restoreState(String)).
The SimpleHint can be used the Cache key as well. It overrides the equals and hashCode methods so the hint becomes the id of the element.

Summary

[Expand]
Inherited Fields
From interface com.microstrategy.utils.cache.CacheHint
Public Constructors
SimpleHint(String str)
SimpleHint()
Public Methods
boolean equals(Object obj)
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
Map getCacheStates()
String getHint()
String getState()
Used for persisting cache update counts.
int hashCode()
void restoreState(String state)
Restore cache update counts.
void setCacheStateId(String name, Long stateId)
Sets the stateId - see getCacheStateId(String).
String toString()
Protected Methods
void setHint(String str)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.utils.cache.CacheHint

Public Constructors

public SimpleHint (String str)

public SimpleHint ()

Public Methods

public boolean equals (Object obj)

public 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 Map getCacheStates ()

public String getHint ()

public String getState ()

Used for persisting cache update counts.

Returns
  • A String representation of the hint.

public int hashCode ()

public void restoreState (String state)

Restore cache update counts.

Parameters
state A String representation of the state of this hint to restore.

public void setCacheStateId (String name, Long stateId)

Sets the stateId - see getCacheStateId(String).

Parameters
name cache name
stateId new cache state id

public String toString ()

Protected Methods

protected void setHint (String str)