Package com.microstrategy.web.transform
Class AbstractLayoutSource.LayoutCacheHint
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractLayoutSource.LayoutCacheHint
-
- All Implemented Interfaces:
CacheHint
- Enclosing class:
- AbstractLayoutSource
protected static class AbstractLayoutSource.LayoutCacheHint extends java.lang.Object implements CacheHint
This class serves as both CacheHint and Cache key. To act as CacheHint, it needs to implement getCacheStateId and setCacheStateId. To act as Cache key, it needs to provides the equals and hashCode methods.- Since:
- MicroStrategy Web 8.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.cache.CacheHint
ZERO_STATE_ID
-
-
Constructor Summary
Constructors Constructor Description LayoutCacheHint(java.lang.String sourceLocation, LayoutParser layoutParser, LayoutSource layoutSource)
The constructor of theLayoutCacheHint
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object anObject)
Indicates whether some other object is "equal to" this one.java.lang.Long
getCacheStateId(java.lang.String name)
This method returns an cache state id of zero.int
hashCode()
Returns a hash code value for the object.void
setCacheStateId(java.lang.String name, java.lang.Long stateId)
This method is a no-op.
-
-
-
Constructor Detail
-
LayoutCacheHint
public LayoutCacheHint(java.lang.String sourceLocation, LayoutParser layoutParser, LayoutSource layoutSource)
The constructor of theLayoutCacheHint
class. The source location and the fully qualified class name of the layout parser are used as keys- Parameters:
sourceLocation
- the layout locationlayoutParser
- the layout parserlayoutSource
- the layout source
-
-
Method Detail
-
getCacheStateId
public java.lang.Long getCacheStateId(java.lang.String name)
This method returns an cache state id of zero.- Specified by:
getCacheStateId
in interfaceCacheHint
- Parameters:
name
- the cache name- Returns:
- the state id
-
setCacheStateId
public void setCacheStateId(java.lang.String name, java.lang.Long stateId)
This method is a no-op.- Specified by:
setCacheStateId
in interfaceCacheHint
- Parameters:
name
- the cache namestateId
- the cache state id
-
equals
public boolean equals(java.lang.Object anObject)
Indicates whether some other object is "equal to" this one. This method uses the layout source location and layout parser name to compare the equalness of twoLayoutCacheHint
.- Overrides:
equals
in classjava.lang.Object
- Parameters:
anObject
- anotherLayoutCacheHint
.- Returns:
true
if the currentLayoutCacheHint
is equal to the object passed in.
-
hashCode
public int hashCode()
Returns a hash code value for the object. This method "xor" the hash codes of the source location and the parser class name.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this object.
-
-