public class NearCacheConfigReadOnly extends NearCacheConfig
NearCacheConfig.LocalUpdatePolicyDEFAULT_EVICTION_POLICY, DEFAULT_INVALIDATE_ON_CHANGE, DEFAULT_LOCAL_UPDATE_POLICY, DEFAULT_MAX_IDLE_SECONDS, DEFAULT_MAX_SIZE, DEFAULT_MEMORY_FORMAT, DEFAULT_SERIALIZE_KEYS, DEFAULT_TTL_SECONDS| Constructor and Description |
|---|
NearCacheConfigReadOnly()
Deprecated.
|
NearCacheConfigReadOnly(NearCacheConfig config)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
EvictionConfig |
getEvictionConfig()
Deprecated.
Returns the eviction configuration for this Near Cache.
|
int |
getId()
Deprecated.
Returns type identifier for this class.
|
NearCachePreloaderConfig |
getPreloaderConfig()
Deprecated.
Returns the
NearCachePreloaderConfig of this Near Cache. |
NearCacheConfig |
setCacheLocalEntries(boolean cacheLocalEntries)
Deprecated.
Sets if local entries are also cached in the Near Cache.
|
NearCacheConfig |
setEvictionConfig(EvictionConfig evictionConfig)
Deprecated.
Sets the eviction configuration for this Near Cache.
|
NearCacheConfig |
setEvictionPolicy(String evictionPolicy)
Deprecated.
Sets the eviction policy.
|
NearCacheConfig |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Deprecated.
Sets the data type used to store entries.
|
NearCacheConfig |
setInMemoryFormat(String inMemoryFormat)
Deprecated.
|
NearCacheConfig |
setInvalidateOnChange(boolean invalidateOnChange)
Deprecated.
Sets if Near Cache entries are invalidated when the entries in the backing data structure are changed
(updated or removed).
|
NearCacheConfig |
setLocalUpdatePolicy(NearCacheConfig.LocalUpdatePolicy localUpdatePolicy)
Deprecated.
Sets the
NearCacheConfig.LocalUpdatePolicy of this Near Cache. |
NearCacheConfig |
setMaxIdleSeconds(int maxIdleSeconds)
Deprecated.
Set the maximum number of seconds each entry can stay in the Near Cache as untouched (not-read).
|
NearCacheConfig |
setMaxSize(int maxSize)
Deprecated.
Sets the maximum size of the Near Cache.
|
NearCacheConfig |
setName(String name)
Deprecated.
Sets the name of the Near Cache.
|
NearCacheConfig |
setPreloaderConfig(NearCachePreloaderConfig preloaderConfig)
Deprecated.
Sets the
NearCachePreloaderConfig of this Near Cache. |
NearCacheConfig |
setSerializeKeys(boolean serializeKeys)
Deprecated.
Sets if the Near Cache key is stored in serialized format or by-reference.
|
NearCacheConfig |
setTimeToLiveSeconds(int timeToLiveSeconds)
Deprecated.
Returns the maximum number of seconds for each entry to stay in the Near Cache (time to live).
|
equals, getAsReadOnly, getEvictionPolicy, getFactoryId, getInMemoryFormat, getLocalUpdatePolicy, getMaxIdleSeconds, getMaxSize, getName, getTimeToLiveSeconds, hashCode, isCacheLocalEntries, isInvalidateOnChange, isSerializeKeys, readData, toString, writeDatapublic NearCacheConfigReadOnly()
public NearCacheConfigReadOnly(NearCacheConfig config)
public NearCacheConfig setName(String name)
NearCacheConfigsetName in interface NamedConfigsetName in class NearCacheConfigname - the name of the Near Cachepublic NearCacheConfig setTimeToLiveSeconds(int timeToLiveSeconds)
NearCacheConfig
Entries that are older than timeToLiveSeconds will automatically be evicted from the Near Cache.
Accepts any integer between 0 and Integer.MAX_VALUE.
The value 0 means Integer.MAX_VALUE.
The default is 0.
setTimeToLiveSeconds in class NearCacheConfigtimeToLiveSeconds - the maximum number of seconds for each entry to stay in the Near Cachepublic NearCacheConfig setMaxSize(int maxSize)
NearCacheConfigWhen the maxSize is reached, the Near Cache is evicted based on the policy defined.
Accepts any integer between 0 and Integer.MAX_VALUE.
The value 0 means Integer.MAX_VALUE.
The default is 0.
setMaxSize in class NearCacheConfigmaxSize - the maximum size of the Near Cachepublic NearCacheConfig setEvictionPolicy(String evictionPolicy)
NearCacheConfigValid 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)
LRU is the default.
Regardless of the eviction policy used, time-to-live-seconds and max-idle-seconds will still apply.
setEvictionPolicy in class NearCacheConfigevictionPolicy - the eviction policy for the Near Cachepublic NearCacheConfig setMaxIdleSeconds(int maxIdleSeconds)
NearCacheConfig
Entries that are not read (touched) more than maxIdleSeconds value will get removed from the Near Cache.
Accepts any integer between 0 and Integer.MAX_VALUE.
The value 0 means Integer.MAX_VALUE.
The default is 0.
setMaxIdleSeconds in class NearCacheConfigmaxIdleSeconds - maximum number of seconds each entry can stay in the Near Cache as untouched (not-read)public NearCacheConfig setSerializeKeys(boolean serializeKeys)
NearCacheConfigNATIVE.
You can still set this value to false, but it will have no effect.setSerializeKeys in class NearCacheConfigserializeKeys - true if the key is stored in serialized format, false if stored by-referencepublic NearCacheConfig setInvalidateOnChange(boolean invalidateOnChange)
NearCacheConfigWhen 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.
setInvalidateOnChange in class NearCacheConfiginvalidateOnChange - true to enable Near Cache invalidations, false otherwisepublic NearCacheConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
NearCacheConfigPossible values:
BINARY: keys and values are stored as binary dataOBJECT: values are stored in their object formsNATIVE: keys and values are stored in native memoryBINARY.setInMemoryFormat in class NearCacheConfiginMemoryFormat - the data type used to store entriespublic NearCacheConfig setInMemoryFormat(String inMemoryFormat)
setInMemoryFormat in class NearCacheConfigpublic NearCacheConfig setCacheLocalEntries(boolean cacheLocalEntries)
NearCacheConfigThis is useful when the in-memory format of the Near Cache is different from the backing data structure. This setting has no meaning on Hazelcast clients, since they have no local entries.
setCacheLocalEntries in class NearCacheConfigcacheLocalEntries - true if local entries are also cached, false otherwisepublic NearCacheConfig setLocalUpdatePolicy(NearCacheConfig.LocalUpdatePolicy localUpdatePolicy)
NearCacheConfigNearCacheConfig.LocalUpdatePolicy of this Near Cache.
This is only implemented for JCache data structures.
setLocalUpdatePolicy in class NearCacheConfiglocalUpdatePolicy - the NearCacheConfig.LocalUpdatePolicy of this Near Cachepublic NearCacheConfig setEvictionConfig(EvictionConfig evictionConfig)
NearCacheConfigsetEvictionConfig in class NearCacheConfigevictionConfig - the eviction configurationpublic EvictionConfig getEvictionConfig()
NearCacheConfiggetEvictionConfig in class NearCacheConfigpublic NearCacheConfig setPreloaderConfig(NearCachePreloaderConfig preloaderConfig)
NearCacheConfigNearCachePreloaderConfig of this Near Cache.setPreloaderConfig in class NearCacheConfigpreloaderConfig - the NearCachePreloaderConfig of this Near Cachepublic NearCachePreloaderConfig getPreloaderConfig()
NearCacheConfigNearCachePreloaderConfig of this Near Cache.getPreloaderConfig in class NearCacheConfigNearCachePreloaderConfig of this Near Cachepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablegetId in class NearCacheConfigCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.