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 entriestimeToLiveSeconds- the time to live of an entry, 0 or less when not settimeToIdleSeconds- the time to idle of an entry, 0 or less when not seteternal- true when the entries never expirestatistics- true when the statistics of the cache are enabledenableManagement- 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 Summary
ConstructorsConstructorDescriptionCacheSettings(int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean eternal, boolean statistics, boolean enableManagement) Creates an instance of aCacheSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theenableManagementrecord component.final booleanIndicates whether some other object is "equal to" this one.booleaneternal()Returns the value of theeternalrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxElementsInMemoryrecord component.booleanReturns the value of thestatisticsrecord component.intReturns the value of thetimeToIdleSecondsrecord component.intReturns the value of thetimeToLiveSecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CacheSettings
public CacheSettings(int maxElementsInMemory, int timeToLiveSeconds, int timeToIdleSeconds, boolean eternal, boolean statistics, boolean enableManagement) Creates an instance of aCacheSettingsrecord class.- Parameters:
maxElementsInMemory- the value for themaxElementsInMemoryrecord componenttimeToLiveSeconds- the value for thetimeToLiveSecondsrecord componenttimeToIdleSeconds- the value for thetimeToIdleSecondsrecord componenteternal- the value for theeternalrecord componentstatistics- the value for thestatisticsrecord componentenableManagement- the value for theenableManagementrecord 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 with '=='. -
maxElementsInMemory
public int maxElementsInMemory()Returns the value of themaxElementsInMemoryrecord component.- Returns:
- the value of the
maxElementsInMemoryrecord component
-
timeToLiveSeconds
public int timeToLiveSeconds()Returns the value of thetimeToLiveSecondsrecord component.- Returns:
- the value of the
timeToLiveSecondsrecord component
-
timeToIdleSeconds
public int timeToIdleSeconds()Returns the value of thetimeToIdleSecondsrecord component.- Returns:
- the value of the
timeToIdleSecondsrecord component
-
eternal
public boolean eternal()Returns the value of theeternalrecord component.- Returns:
- the value of the
eternalrecord component
-
statistics
public boolean statistics()Returns the value of thestatisticsrecord component.- Returns:
- the value of the
statisticsrecord component
-
enableManagement
public boolean enableManagement()Returns the value of theenableManagementrecord component.- Returns:
- the value of the
enableManagementrecord component
-