Hazelcast C++ Client
|
Contains the configuration for a Near Cache. More...
#include <NearCacheConfig.h>
Public Types | |
enum | LocalUpdatePolicy { INVALIDATE, CACHE } |
Local Update Policy enum. More... | |
Public Member Functions | |
NearCacheConfig (const char *cacheName) | |
NearCacheConfig (const char *cacheName, InMemoryFormat memoryFormat) | |
NearCacheConfig (int32_t timeToLiveSeconds, int32_t maxIdleSeconds, bool invalidateOnChange, InMemoryFormat inMemoryFormat, boost::shared_ptr< EvictionConfig< K, V > > evictConfig) | |
NearCacheConfig (const NearCacheConfig< K, V > &config) | |
const std::string & | getName () const |
Gets the name of the Near Cache. More... | |
NearCacheConfig & | setName (const std::string &name) |
Sets the name of the Near Cache. More... | |
int32_t | getTimeToLiveSeconds () const |
Gets the maximum number of seconds for each entry to stay in the Near Cache. More... | |
NearCacheConfig & | setTimeToLiveSeconds (int32_t timeToLiveSeconds) |
Sets the maximum number of seconds for each entry to stay in the Near Cache. More... | |
int32_t | getMaxIdleSeconds () const |
Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). More... | |
NearCacheConfig & | setMaxIdleSeconds (int32_t maxIdleSeconds) |
Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). More... | |
bool | isInvalidateOnChange () const |
True to evict the cached entries if the entries are changed (updated or removed). More... | |
NearCacheConfig & | setInvalidateOnChange (bool invalidateOnChange) |
True to evict the cached entries if the entries are changed (updated or removed). More... | |
const InMemoryFormat & | getInMemoryFormat () const |
Gets the data type used to store entries. More... | |
virtual NearCacheConfig & | setInMemoryFormat (const InMemoryFormat &inMemoryFormat) |
Sets the data type used to store entries. More... | |
bool | isCacheLocalEntries () const |
If true, cache local entries also. More... | |
NearCacheConfig & | setCacheLocalEntries (bool cacheLocalEntries) |
True to cache local entries also. More... | |
const LocalUpdatePolicy & | getLocalUpdatePolicy () const |
NearCacheConfig & | setLocalUpdatePolicy (const LocalUpdatePolicy &localUpdatePolicy) |
const boost::shared_ptr< EvictionConfig< K, V > > & | getEvictionConfig () const |
The eviction configuration. More... | |
NearCacheConfig & | setEvictionConfig (const boost::shared_ptr< EvictionConfig< K, V > > &evictionConfig) |
Sets the eviction configuration. More... | |
std::ostream & | operator<< (std::ostream &out) |
Static Public Attributes | |
static const int32_t | DEFAULT_TTL_SECONDS = 0 |
Default value of the time to live in seconds. | |
static const int32_t | DEFAULT_MAX_IDLE_SECONDS = 0 |
Default value of the idle time for eviction in seconds. | |
static const InMemoryFormat | DEFAULT_MEMORY_FORMAT = BINARY |
Default value for the in-memory format. | |
Contains the configuration for a Near Cache.
enum hazelcast::client::config::NearCacheConfig::LocalUpdatePolicy |
|
inline |
The eviction configuration.
|
inline |
Gets the data type used to store entries.
Possible values: BINARY (default): keys and values are stored as binary data. OBJECT: values are stored in their object forms.
|
inline |
Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read).
Entries that are not read (touched) more than max-idle-seconds value will get removed from the Near Cache.
|
inline |
Gets the name of the Near Cache.
|
inline |
Gets the maximum number of seconds for each entry to stay in the Near Cache.
Entries that are older than time-to-live-seconds will get automatically evicted from the Near Cache.
|
inline |
If true, cache local entries also.
This is useful when in-memory-format for Near Cache is different than the map's one.
|
inline |
True to evict the cached entries if the entries are changed (updated or removed).
When true, the member listens for cluster-wide changes on the entries and invalidates them on change. Changes done on the local member always invalidate the cache.
|
inline |
True to cache local entries also.
This is useful when in-memory-format for Near Cache is different than the map's one.
cacheLocalEntries | True to cache local entries also. |
|
inline |
Sets the eviction configuration.
evictionConfig | The eviction configuration. |
|
inlinevirtual |
Sets the data type used to store entries.
Possible values: BINARY (default): keys and values are stored as binary data. OBJECT: values are stored in their object forms.
inMemoryFormat | The data type used to store entries. |
|
inline |
True to evict the cached entries if the entries are changed (updated or removed).
If set to true, the member will listen for cluster-wide changes on the entries and invalidate them on change. Changes done on the local member always invalidate the cache.
invalidateOnChange | True to evict the cached entries if the entries are changed (updated or removed), false otherwise. |
|
inline |
Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read).
Entries that are not read (touched) more than max-idle-seconds value will get removed from the Near Cache. Any integer between 0 and Integer.MAX_VALUE. 0 means Integer.MAX_VALUE. Default is 0.
maxIdleSeconds | Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). |
|
inline |
Sets the name of the Near Cache.
name | The name of the Near Cache. |
|
inline |
Sets the maximum number of seconds for each entry to stay in the Near Cache.
Entries that are older than time-to-live-seconds will get automatically evicted from the Near Cache. Any integer between 0 and Integer.MAX_VALUE. 0 means infinite. Default is 0.
timeToLiveSeconds | The maximum number of seconds for each entry to stay in the Near Cache. |