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 maximum
expireAfterWrite - 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 Details

  • Constructor Details

    • CacheConfiguration

      public CacheConfiguration(@Nullable Integer maxSize, @Nullable Duration expireAfterWrite, @Nullable Duration expireAfterAccess)
      Creates an instance of a CacheConfiguration record class.
      Parameters:
      maxSize - the value for the maxSize record component
      expireAfterWrite - the value for the expireAfterWrite record component
      expireAfterAccess - the value for the expireAfterAccess record component
  • Method Details

    • expireAfterAccess

      public Duration expireAfterAccess()
      Returns the value of the expireAfterAccess record component.
      Returns:
      the value of the expireAfterAccess record component
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxSize

      @Nullable public Integer maxSize()
      Returns the value of the maxSize record component.
      Returns:
      the value of the maxSize record component
    • expireAfterWrite

      @Nullable public Duration expireAfterWrite()
      Returns the value of the expireAfterWrite record component.
      Returns:
      the value of the expireAfterWrite record component