Click or drag to resize

NearCacheConfig Methods

The NearCacheConfig type exposes the following members.

Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetAsReadOnly
Returns an immutable version of this configuration.
Public methodGetEvictionPolicy
Returns the eviction policy for the Near Cache.
Public methodGetHashCode (Inherited from Object.)
Public methodGetInMemoryFormat
Public methodGetMaxIdleSeconds
Gets the maximum number of seconds each entry can stay in the Near Cache as untouched (not read).
Public methodGetMaxSize
Returns the maximum size of the Near Cache.
When the maxSize is reached, the Near Cache is evicted based on the policy defined.
Public methodGetName
Returns the name of the Near Cache
Public methodGetTimeToLiveSeconds
Returns the maximum number of seconds for each entry to stay in the Near Cache (time to live).
Entries that are older than timeToLiveSeconds will automatically be evicted from the Near Cache.
Public methodGetType (Inherited from Object.)
Public methodIsCacheLocalEntries Obsolete.
Public methodIsInvalidateOnChange
Checks if Near Cache entries are invalidated when the entries in the backing data structure are changed (updated or removed).
When this setting is enabled, a Hazelcast instance with a Near Cache listens for cluster-wide changes on the entries of the backing data structure and invalidates its corresponding Near Cache entries. Changes done on the local Hazelcast instance always invalidate the Near Cache immediately.
Public methodIsSerializeKeys
Public methodSetCacheLocalEntries Obsolete.
Public methodSetEvictionPolicy
Sets the eviction policy. Valid values are:
  • LRU (Least Recently Used)
  • LFU (Least Frequently Used)
  • NONE (no extra eviction, time-to-live-seconds or max-idle-seconds may still apply)
  • RANDOM (random entry)
Public methodSetInMemoryFormat(String)
SetInMemoryFormat(InMemoryFormat) this setter is for reflection based configuration building
Public methodSetInMemoryFormat(InMemoryFormat)
Sets the data type used to store entries.
Possible values:
  • BINARY: keys and values are stored as binary data
  • OBJECT: values are stored in their object forms
  • NATIVE: keys and values are stored in native memory
The default value is BINARY.
Public methodSetInvalidateOnChange
Sets if Near Cache entries are invalidated when the entries in the backing data structure are changed (updated or removed).
When this setting is enabled, a Hazelcast instance with a Near Cache listens for cluster-wide changes on the entries of the backing data structure and invalidates its corresponding Near Cache entries. Changes done on the local Hazelcast instance always invalidate the Near Cache immediately.
Public methodSetMaxIdleSeconds
Set the maximum number of seconds each entry can stay in the Near Cache as untouched (not read).
Public methodSetMaxSize
Sets the maximum size of the Near Cache. When the maxSize is reached, the Near Cache is evicted based on the policy defined.
Accepts any integer between 0 and int.MaxValue. The value 0 means int.MaxValue. The default is 0.
Public methodSetName
Sets the name of the Near Cache.
Public methodSetSerializeKeys
Public methodSetTimeToLiveSeconds
Returns the maximum number of seconds for each entry to stay in the Near Cache (time to live).
Entries that are older than {@code timeToLiveSeconds} will automatically be evicted from the Near Cache.
Accepts any integer between 0 and int.MaxValue. The value 0 means int.MaxValue. The default is 0.
Public methodToString (Overrides ObjectToString.)
Top
See Also