public class NearCacheConfigReadOnly extends NearCacheConfig
NearCacheConfig.LocalUpdatePolicy
DEFAULT_EVICTION_POLICY, DEFAULT_MAX_IDLE_SECONDS, DEFAULT_MAX_SIZE, DEFAULT_MEMORY_FORMAT, DEFAULT_TTL_SECONDS
Constructor and Description |
---|
NearCacheConfigReadOnly(NearCacheConfig config) |
Modifier and Type | Method and Description |
---|---|
NearCacheConfig |
setCacheLocalEntries(boolean cacheLocalEntries)
True to cache local entries also.
|
NearCacheConfig |
setEvictionPolicy(String evictionPolicy)
Valid values are:
NONE (no extra eviction, time-to-live-seconds may still apply),
LRU (Least Recently Used),
LFU (Least Frequently Used).
|
NearCacheConfig |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Sets the data type used to store entries.
|
NearCacheConfig |
setInMemoryFormat(String inMemoryFormat) |
NearCacheConfig |
setInvalidateOnChange(boolean invalidateOnChange)
True to evict the cached entries if the entries are changed (updated or removed).
|
NearCacheConfig |
setMaxIdleSeconds(int maxIdleSeconds)
Maximum number of seconds each entry can stay in the near cache as untouched (not-read).
|
NearCacheConfig |
setMaxSize(int maxSize)
Sets the maximum size of the near cache.
|
NearCacheConfig |
setName(String name)
Sets the name of the near cache.
|
NearCacheConfig |
setTimeToLiveSeconds(int timeToLiveSeconds)
Sets the maximum number of seconds for each entry to stay in the near cache.
|
getAsReadOnly, getEvictionConfig, getEvictionPolicy, getInMemoryFormat, getLocalUpdatePolicy, getMaxIdleSeconds, getMaxSize, getName, getTimeToLiveSeconds, isCacheLocalEntries, isInvalidateOnChange, readData, setEvictionConfig, setLocalUpdatePolicy, toString, writeData
public NearCacheConfigReadOnly(NearCacheConfig config)
public NearCacheConfig setName(String name)
NearCacheConfig
setName
in class NearCacheConfig
name
- The name of the near cache.public NearCacheConfig setTimeToLiveSeconds(int timeToLiveSeconds)
NearCacheConfig
setTimeToLiveSeconds
in class NearCacheConfig
timeToLiveSeconds
- The maximum number of seconds for each entry to stay in the near cache.public NearCacheConfig setMaxSize(int maxSize)
NearCacheConfig
setMaxSize
in class NearCacheConfig
maxSize
- The maximum number of seconds for each entry to stay in the near cache.public NearCacheConfig setEvictionPolicy(String evictionPolicy)
NearCacheConfig
setEvictionPolicy
in class NearCacheConfig
evictionPolicy
- The eviction policy for the near cache.public NearCacheConfig setMaxIdleSeconds(int maxIdleSeconds)
NearCacheConfig
setMaxIdleSeconds
in class NearCacheConfig
maxIdleSeconds
- Maximum number of seconds each entry can stay in the near cache as
untouched (not-read).public NearCacheConfig setInvalidateOnChange(boolean invalidateOnChange)
NearCacheConfig
setInvalidateOnChange
in class NearCacheConfig
invalidateOnChange
- True to evict the cached entries if the entries are
changed (updated or removed), false otherwise.public NearCacheConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
NearCacheConfig
setInMemoryFormat
in class NearCacheConfig
inMemoryFormat
- The data type used to store entries.public NearCacheConfig setInMemoryFormat(String inMemoryFormat)
setInMemoryFormat
in class NearCacheConfig
public NearCacheConfig setCacheLocalEntries(boolean cacheLocalEntries)
NearCacheConfig
setCacheLocalEntries
in class NearCacheConfig
cacheLocalEntries
- True to cache local entries also.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.