Record Class Config.Cache.CacheSetting

java.lang.Object
java.lang.Record
net.flectone.pulse.config.Config.Cache.CacheSetting
Enclosing class:
Config.Cache

public static record Config.Cache.CacheSetting(boolean invalidateOnReload, boolean expireAfterWrite, long duration, TimeUnit timeUnit, long size) extends Record
Since:
1.7.1
  • Constructor Details

    • CacheSetting

      public CacheSetting(boolean invalidateOnReload, boolean expireAfterWrite, long duration, TimeUnit timeUnit, long size)
      Creates an instance of a CacheSetting record class.
      Parameters:
      invalidateOnReload - the value for the invalidateOnReload record component
      expireAfterWrite - the value for the expireAfterWrite record component
      duration - the value for the duration record component
      timeUnit - the value for the timeUnit record component
      size - the value for the size record component
  • Method Details

    • builder

    • toBuilder

    • withInvalidateOnReload

      public Config.Cache.CacheSetting withInvalidateOnReload(boolean invalidateOnReload)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withExpireAfterWrite

      public Config.Cache.CacheSetting withExpireAfterWrite(boolean expireAfterWrite)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDuration

      public Config.Cache.CacheSetting withDuration(long duration)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTimeUnit

      public Config.Cache.CacheSetting withTimeUnit(TimeUnit timeUnit)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withSize

      public Config.Cache.CacheSetting withSize(long size)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • invalidateOnReload

      public boolean invalidateOnReload()
      Returns the value of the invalidateOnReload record component.
      Returns:
      the value of the invalidateOnReload record component
    • expireAfterWrite

      public boolean expireAfterWrite()
      Returns the value of the expireAfterWrite record component.
      Returns:
      the value of the expireAfterWrite record component
    • duration

      public long duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • timeUnit

      public TimeUnit timeUnit()
      Returns the value of the timeUnit record component.
      Returns:
      the value of the timeUnit record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component