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 theLayoutCacheHintclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object anObject)Indicates whether some other object is "equal to" this one.java.lang.LonggetCacheStateId(java.lang.String name)This method returns an cache state id of zero.inthashCode()Returns a hash code value for the object.voidsetCacheStateId(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 theLayoutCacheHintclass. 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:
getCacheStateIdin 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:
setCacheStateIdin 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:
equalsin classjava.lang.Object- Parameters:
anObject- anotherLayoutCacheHint.- Returns:
trueif the currentLayoutCacheHintis 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:
hashCodein classjava.lang.Object- Returns:
- a hash code value for this object.
-
-