Package io.kroxylicious.proxy.config
Record Class CacheConfiguration
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.CacheConfiguration
- Record Components:
maxSize- the maximum number of entries the cache may contain, default (null) means no maximumexpireAfterWrite- cache entries should be automatically removed from the cache once this duration has elapsed after the entry's creation, or the most recent replacement of its value. The default is to never expire.expireAfterAccess- cache entries should be automatically removed from the cache once this duration has elapsed after the entry's creation, creation, the most recent replacement of its value, or its last access. The default is 1 hour.
public record CacheConfiguration(Integer maxSize, Duration expireAfterWrite, Duration expireAfterAccess)
extends Record
Cache Configuration
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCacheConfiguration(Integer maxSize, Duration expireAfterWrite, Duration expireAfterAccess) Creates an instance of aCacheConfigurationrecord 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.maxSize()Returns the value of themaxSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
CacheConfiguration
public CacheConfiguration(@Nullable Integer maxSize, @Nullable Duration expireAfterWrite, @Nullable Duration expireAfterAccess) Creates an instance of aCacheConfigurationrecord class.- Parameters:
maxSize- the value for themaxSizerecord componentexpireAfterWrite- the value for theexpireAfterWriterecord componentexpireAfterAccess- the value for theexpireAfterAccessrecord component
-
-
Method Details
-
expireAfterAccess
Returns the value of theexpireAfterAccessrecord component.- Returns:
- the value of the
expireAfterAccessrecord component
-
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). -
maxSize
Returns the value of themaxSizerecord component.- Returns:
- the value of the
maxSizerecord component
-
expireAfterWrite
Returns the value of theexpireAfterWriterecord component.- Returns:
- the value of the
expireAfterWriterecord component
-