Click or drag to resize

NearCacheConfig Class

Contains the configuration for a Near Cache.
Inheritance Hierarchy
SystemObject
  Hazelcast.ConfigNearCacheConfig
    Hazelcast.ConfigNearCacheConfigReadOnly

Namespace:  Hazelcast.Config
Assembly:  Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.12.3
Syntax
public class NearCacheConfig

The NearCacheConfig type exposes the following members.

Constructors
  NameDescription
Public methodNearCacheConfig
Initializes a new instance of the NearCacheConfig class
Public methodNearCacheConfig(String)
Initializes a new instance of the NearCacheConfig class
Public methodNearCacheConfig(NearCacheConfig)
Initializes a new instance of the NearCacheConfig class
Public methodNearCacheConfig(Int32, Int32, String, Int32, Boolean, InMemoryFormat)
Initializes a new instance of the NearCacheConfig class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetAsReadOnly
Returns an immutable version of this configuration.
Public methodGetEvictionPolicy
Returns the eviction policy for the Near Cache.
Public methodGetHashCode
Serves as the default hash function.
(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
Gets the Type of the current instance.
(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
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Fields
See Also