Record Class CacheSettings

java.lang.Object
java.lang.Record
fr.paris.lutece.portal.service.cache.CacheSettings
Record Components:
maxElementsInMemory - the maximum number of entries, 0 or less when the cache is not bounded by entries
timeToLiveSeconds - the time to live of an entry, 0 or less when not set
timeToIdleSeconds - the time to idle of an entry, 0 or less when not set
eternal - true when the entries never expire
statistics - true when the statistics of the cache are enabled
enableManagement - true when the management of the cache is enabled

public record CacheSettings(int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean eternal, boolean statistics, boolean enableManagement) extends Record
The Lutece settings of a cache (its own settings completed by the default ones), as read from caches.properties, the configuration and the datastore keys core.cache.status.<name>.<setting>.
  • Constructor Details

    • CacheSettings

      public CacheSettings(int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean eternal, boolean statistics, boolean enableManagement)
      Creates an instance of a CacheSettings record class.
      Parameters:
      maxElementsInMemory - the value for the maxElementsInMemory record component
      timeToLiveSeconds - the value for the timeToLiveSeconds record component
      timeToIdleSeconds - the value for the timeToIdleSeconds record component
      eternal - the value for the eternal record component
      statistics - the value for the statistics record component
      enableManagement - the value for the enableManagement record component
  • Method Details

    • 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 '=='.
      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.
    • maxElementsInMemory

      public int maxElementsInMemory()
      Returns the value of the maxElementsInMemory record component.
      Returns:
      the value of the maxElementsInMemory record component
    • timeToLiveSeconds

      public int timeToLiveSeconds()
      Returns the value of the timeToLiveSeconds record component.
      Returns:
      the value of the timeToLiveSeconds record component
    • timeToIdleSeconds

      public int timeToIdleSeconds()
      Returns the value of the timeToIdleSeconds record component.
      Returns:
      the value of the timeToIdleSeconds record component
    • eternal

      public boolean eternal()
      Returns the value of the eternal record component.
      Returns:
      the value of the eternal record component
    • statistics

      public boolean statistics()
      Returns the value of the statistics record component.
      Returns:
      the value of the statistics record component
    • enableManagement

      public boolean enableManagement()
      Returns the value of the enableManagement record component.
      Returns:
      the value of the enableManagement record component