Record Class Config.Cache.CacheSetting
java.lang.Object
java.lang.Record
net.flectone.pulse.config.Config.Cache.CacheSetting
- Enclosing class:
Config.Cache
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCacheSetting(boolean invalidateOnReload, boolean expireAfterWrite, long duration, TimeUnit timeUnit, long size) Creates an instance of aCacheSettingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()longduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexpireAfterWriterecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinvalidateOnReloadrecord component.longsize()Returns the value of thesizerecord component.timeUnit()Returns the value of thetimeUnitrecord component.final StringtoString()Returns a string representation of this record class.withDuration(long duration) withExpireAfterWrite(boolean expireAfterWrite) withInvalidateOnReload(boolean invalidateOnReload) withSize(long size) withTimeUnit(TimeUnit timeUnit)
-
Constructor Details
-
CacheSetting
public CacheSetting(boolean invalidateOnReload, boolean expireAfterWrite, long duration, TimeUnit timeUnit, long size) Creates an instance of aCacheSettingrecord class.- Parameters:
invalidateOnReload- the value for theinvalidateOnReloadrecord componentexpireAfterWrite- the value for theexpireAfterWriterecord componentduration- the value for thedurationrecord componenttimeUnit- the value for thetimeUnitrecord componentsize- the value for thesizerecord component
-
-
Method Details
-
builder
-
toBuilder
-
withInvalidateOnReload
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withExpireAfterWrite
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDuration
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTimeUnit
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSize
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
invalidateOnReload
public boolean invalidateOnReload()Returns the value of theinvalidateOnReloadrecord component.- Returns:
- the value of the
invalidateOnReloadrecord component
-
expireAfterWrite
public boolean expireAfterWrite()Returns the value of theexpireAfterWriterecord component.- Returns:
- the value of the
expireAfterWriterecord component
-
duration
public long duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
timeUnit
Returns the value of thetimeUnitrecord component.- Returns:
- the value of the
timeUnitrecord component
-
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-