Package ru.tinkoff.kora.cache.caffeine
Record Class CaffeineCacheConfig.NamedCacheConfig
java.lang.Object
java.lang.Record
ru.tinkoff.kora.cache.caffeine.CaffeineCacheConfig.NamedCacheConfig
- Enclosing interface:
- CaffeineCacheConfig
-
Constructor Summary
ConstructorsConstructorDescriptionNamedCacheConfig(Duration expireAfterWrite, Duration expireAfterAccess, Long maximumSize, Integer initialSize) Creates an instance of aNamedCacheConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpireAfterAccessrecord component.Returns the value of theexpireAfterWriterecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialSizerecord component.Returns the value of themaximumSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NamedCacheConfig
public NamedCacheConfig(@Nullable Duration expireAfterWrite, @Nullable Duration expireAfterAccess, @Nullable Long maximumSize, @Nullable Integer initialSize) Creates an instance of aNamedCacheConfigrecord class.- Parameters:
expireAfterWrite- the value for theexpireAfterWriterecord componentexpireAfterAccess- the value for theexpireAfterAccessrecord componentmaximumSize- the value for themaximumSizerecord componentinitialSize- the value for theinitialSizerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
expireAfterWrite
Returns the value of theexpireAfterWriterecord component.- Returns:
- the value of the
expireAfterWriterecord component
-
expireAfterAccess
Returns the value of theexpireAfterAccessrecord component.- Returns:
- the value of the
expireAfterAccessrecord component
-
maximumSize
Returns the value of themaximumSizerecord component.- Returns:
- the value of the
maximumSizerecord component
-
initialSize
Returns the value of theinitialSizerecord component.- Returns:
- the value of the
initialSizerecord component
-