Record Class NearCache.NearCacheConfig
java.lang.Object
java.lang.Record
com.loomcache.client.cache.NearCache.NearCacheConfig
public static record NearCache.NearCacheConfig(int maxSize, Duration ttl, NearCache.EvictionPolicy evictionPolicy, Duration maxIdleTime)
extends Record
Configuration for NearCache.
-
Constructor Summary
ConstructorsConstructorDescriptionNearCacheConfig(int maxSize, Duration ttl, NearCache.EvictionPolicy evictionPolicy) NearCacheConfig(int maxSize, Duration ttl, NearCache.EvictionPolicy evictionPolicy, Duration maxIdleTime) Creates an instance of aNearCacheConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NearCache.NearCacheConfigdefaults()final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevictionPolicyrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themaxIdleTimerecord component.intmaxSize()Returns the value of themaxSizerecord component.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.
-
Constructor Details
-
NearCacheConfig
-
NearCacheConfig
public NearCacheConfig(int maxSize, Duration ttl, NearCache.EvictionPolicy evictionPolicy, Duration maxIdleTime) Creates an instance of aNearCacheConfigrecord class.- Parameters:
maxSize- the value for themaxSizerecord componentttl- the value for thettlrecord componentevictionPolicy- the value for theevictionPolicyrecord componentmaxIdleTime- the value for themaxIdleTimerecord component
-
-
Method Details
-
defaults
-
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. -
maxSize
public int maxSize()Returns the value of themaxSizerecord component.- Returns:
- the value of the
maxSizerecord component
-
ttl
Returns the value of thettlrecord component.- Returns:
- the value of the
ttlrecord component
-
evictionPolicy
Returns the value of theevictionPolicyrecord component.- Returns:
- the value of the
evictionPolicyrecord component
-
maxIdleTime
Returns the value of themaxIdleTimerecord component.- Returns:
- the value of the
maxIdleTimerecord component
-