Record Class CacheTestSupport.CacheOperation.PutIfAbsentWithTtl<K,V>
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.testing.CacheTestSupport.CacheOperation.PutIfAbsentWithTtl<K,V>
- Type Parameters:
K- key type | 键类型V- value type | 值类型- Record Components:
key- the key | 键value- the value | 值ttl- the time-to-live | 过期时间
- All Implemented Interfaces:
CacheTestSupport.CacheOperation<K,V>
- Enclosing interface:
CacheTestSupport.CacheOperation<K,V>
public static record CacheTestSupport.CacheOperation.PutIfAbsentWithTtl<K,V> (K key, V value, Duration ttl)
extends Record
implements CacheTestSupport.CacheOperation<K,V>
Put if absent with TTL operation | 带过期时间的不存在则放入操作
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from interface CacheTestSupport.CacheOperation
CacheTestSupport.CacheOperation.Get<K,V>, CacheTestSupport.CacheOperation.GetAll<K, V>, CacheTestSupport.CacheOperation.GetWithLoader<K, V>, CacheTestSupport.CacheOperation.Invalidate<K, V>, CacheTestSupport.CacheOperation.InvalidateAll<K, V>, CacheTestSupport.CacheOperation.Put<K, V>, CacheTestSupport.CacheOperation.PutAll<K, V>, CacheTestSupport.CacheOperation.PutAllWithTtl<K, V>, CacheTestSupport.CacheOperation.PutIfAbsent<K, V>, CacheTestSupport.CacheOperation.PutIfAbsentWithTtl<K, V>, CacheTestSupport.CacheOperation.PutWithTtl<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionPutIfAbsentWithTtl(K key, V value, Duration ttl) Creates an instance of aPutIfAbsentWithTtlrecord 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.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
PutIfAbsentWithTtl
-
-
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). -
key
-
value
-
ttl
-