Record Class TtlDecayPolicy.NoDecay
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.ttl.TtlDecayPolicy.NoDecay
- Record Components:
ttl- the constant time-to-live | 恒定过期时间
- All Implemented Interfaces:
TtlDecayPolicy
- Enclosing interface:
TtlDecayPolicy
No decay - constant TTL
不衰减 - 恒定 TTL
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface TtlDecayPolicy
TtlDecayPolicy.ExponentialDecay, TtlDecayPolicy.LinearDecay, TtlDecayPolicy.NoDecay, TtlDecayPolicy.Step, TtlDecayPolicy.StepDecay -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateDecayedTtl(long accessCount) Calculate decayed TTL based on access count 根据访问次数计算衰减后的 TTLfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Get initial TTL (before any decay) 获取初始 TTL(任何衰减之前)Get minimum TTL (floor) 获取最小 TTL(下限)final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.
-
Constructor Details
-
NoDecay
-
-
Method Details
-
calculateDecayedTtl
Description copied from interface:TtlDecayPolicyCalculate decayed TTL based on access count 根据访问次数计算衰减后的 TTL- Specified by:
calculateDecayedTtlin interfaceTtlDecayPolicy- Parameters:
accessCount- number of times entry has been accessed | 条目被访问的次数- Returns:
- decayed TTL | 衰减后的 TTL
-
initialTtl
Description copied from interface:TtlDecayPolicyGet initial TTL (before any decay) 获取初始 TTL(任何衰减之前)- Specified by:
initialTtlin interfaceTtlDecayPolicy- Returns:
- initial TTL | 初始 TTL
-
minimumTtl
Description copied from interface:TtlDecayPolicyGet minimum TTL (floor) 获取最小 TTL(下限)- Specified by:
minimumTtlin interfaceTtlDecayPolicy- Returns:
- minimum TTL | 最小 TTL
-
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). -
ttl
-