Record Class PreloadPolicy.PatternBased
java.lang.Object
java.lang.Record
com.loomcache.server.cache.PreloadPolicy.PatternBased
- All Implemented Interfaces:
PreloadPolicy
- Enclosing interface:
PreloadPolicy
public static record PreloadPolicy.PatternBased(String pattern)
extends Record
implements PreloadPolicy
Preload keys matching a regex pattern.
Useful for loading keys by namespace or type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface PreloadPolicy
PreloadPolicy.AllKeys, PreloadPolicy.HotKeys, PreloadPolicy.PatternBased, PreloadPolicy.PriorityBased -
Constructor Summary
ConstructorsConstructorDescriptionPatternBased(String pattern) Creates an instance of aPatternBasedrecord class. -
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.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PatternBased
Creates an instance of aPatternBasedrecord class.- Parameters:
pattern- the value for thepatternrecord 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 withObjects::equals(Object,Object). -
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-