Record Class PreloadPolicy.HotKeys
java.lang.Object
java.lang.Record
com.loomcache.server.cache.PreloadPolicy.HotKeys
- All Implemented Interfaces:
PreloadPolicy
- Enclosing interface:
PreloadPolicy
Preload the N most accessed keys from the previous session.
Uses AccessTracker statistics to determine hot keys.
-
Nested Class Summary
Nested classes/interfaces inherited from interface PreloadPolicy
PreloadPolicy.AllKeys, PreloadPolicy.HotKeys, PreloadPolicy.PatternBased, PreloadPolicy.PriorityBased -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inttopN()Returns the value of thetopNrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HotKeys
public HotKeys(int topN) Creates an instance of aHotKeysrecord class.- Parameters:
topN- the value for thetopNrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
topN
public int topN()Returns the value of thetopNrecord component.- Returns:
- the value of the
topNrecord component
-