Record Class CacheWarmer.PriorityKey<K>
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.warming.CacheWarmer.PriorityKey<K>
- Type Parameters:
K- the key type | 键类型- Record Components:
key- the cache key | 缓存键priority- the warming priority | 预热优先级
- Enclosing class:
CacheWarmer<K,V>
Key with priority for priority-based warming
用于基于优先级预热的带优先级的键
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionPriorityKey(K key, int priority) Creates an instance of aPriorityKeyrecord 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.key()Returns the value of thekeyrecord component.static <K> CacheWarmer.PriorityKey<K> of(K key, int priority) Creates a PriorityKey | 创建优先级键intpriority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PriorityKey
-
-
Method Details
-
of
Creates a PriorityKey | 创建优先级键- Type Parameters:
K- the key type | 键类型- Parameters:
key- the key | 键priority- the priority | 优先级- Returns:
- the priority key | 优先级键
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
-
priority
-