![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
Contains the configuration for a Near Cache. More...
#include <near_cache_config.h>
Public Types | |
| enum | local_update_policy { INVALIDATE , CACHE } |
| Local Update Policy enum. More... | |
Public Member Functions | |
| near_cache_config (const std::string &cache_name) | |
| near_cache_config (const std::string &cache_name, in_memory_format memory_format) | |
| near_cache_config (int32_t time_to_live_seconds, int32_t max_idle_seconds, bool invalidate_on_change, in_memory_format in_memory_format, const eviction_config &evict_config) | |
| const std::string & | get_name () const |
| Gets the name of the Near Cache. | |
| near_cache_config & | set_name (const std::string &name) |
| Sets the name of the Near Cache. | |
| int32_t | get_time_to_live_seconds () const |
| Gets the maximum number of seconds for each entry to stay in the Near Cache. | |
| near_cache_config & | set_time_to_live_seconds (int32_t time_to_live_seconds) |
| Sets the maximum number of seconds for each entry to stay in the Near Cache. | |
| int32_t | get_max_idle_seconds () const |
| Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). | |
| near_cache_config & | set_max_idle_seconds (int32_t max_idle_seconds) |
| Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). | |
| bool | is_invalidate_on_change () const |
| True to evict the cached entries if the entries are changed (updated or removed). | |
| near_cache_config & | set_invalidate_on_change (bool invalidate_on_change) |
| True to evict the cached entries if the entries are changed (updated or removed). | |
| const in_memory_format & | get_in_memory_format () const |
| Gets the data type used to store entries. | |
| virtual near_cache_config & | set_in_memory_format (const in_memory_format &in_memory_format) |
| Sets the data type used to store entries. | |
| bool | is_cache_local_entries () const |
| near_cache_config & | set_cache_local_entries (bool cache_local_entries) |
| const local_update_policy & | get_local_update_policy () const |
| near_cache_config & | set_local_update_policy (const local_update_policy &local_update_policy) |
| eviction_config & | get_eviction_config () |
| The eviction configuration. | |
| near_cache_config & | set_eviction_config (const eviction_config &eviction_config) |
| Sets the eviction configuration. | |
Static Public Attributes | |
| static constexpr int32_t | DEFAULT_TTL_SECONDS = 0 |
| Default value of the time to live in seconds. | |
| static constexpr int32_t | DEFAULT_MAX_IDLE_SECONDS = 0 |
| Default value of the idle time for eviction in seconds. | |
| static constexpr in_memory_format | DEFAULT_MEMORY_FORMAT |
| Default value for the in-memory format. | |
Friends | |
| std::ostream HAZELCAST_API & | operator<< (std::ostream &out, const near_cache_config &cache_config) |
Contains the configuration for a Near Cache.
@BinaryInterface
Definition at line 33 of file near_cache_config.h.
Local Update Policy enum.
| Enumerator | |
|---|---|
| INVALIDATE | INVALIDATE POLICY. |
| CACHE | CACHE ON UPDATE POLICY. |
Definition at line 55 of file near_cache_config.h.
| hazelcast::client::config::near_cache_config::near_cache_config | ( | ) |
Definition at line 887 of file config.cpp.
| hazelcast::client::config::near_cache_config::near_cache_config | ( | const std::string & | cache_name | ) |
Definition at line 897 of file config.cpp.
| hazelcast::client::config::near_cache_config::near_cache_config | ( | const std::string & | cache_name, |
| in_memory_format | memory_format ) |
Definition at line 903 of file config.cpp.
| hazelcast::client::config::near_cache_config::near_cache_config | ( | int32_t | time_to_live_seconds, |
| int32_t | max_idle_seconds, | ||
| bool | invalidate_on_change, | ||
| in_memory_format | in_memory_format, | ||
| const eviction_config & | evict_config ) |
Definition at line 910 of file config.cpp.
| eviction_config & hazelcast::client::config::near_cache_config::get_eviction_config | ( | ) |
The eviction configuration.
Definition at line 1019 of file config.cpp.
| const in_memory_format & hazelcast::client::config::near_cache_config::get_in_memory_format | ( | ) | const |
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.
Definition at line 978 of file config.cpp.
| const near_cache_config::local_update_policy & hazelcast::client::config::near_cache_config::get_local_update_policy | ( | ) | const |
Definition at line 1005 of file config.cpp.
| int32_t hazelcast::client::config::near_cache_config::get_max_idle_seconds | ( | ) | const |
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.
Definition at line 951 of file config.cpp.
| const std::string & hazelcast::client::config::near_cache_config::get_name | ( | ) | const |
Gets the name of the Near Cache.
Definition at line 924 of file config.cpp.
| int32_t hazelcast::client::config::near_cache_config::get_time_to_live_seconds | ( | ) | const |
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.
Definition at line 937 of file config.cpp.
| bool hazelcast::client::config::near_cache_config::is_cache_local_entries | ( | ) | const |
Definition at line 992 of file config.cpp.
| bool hazelcast::client::config::near_cache_config::is_invalidate_on_change | ( | ) | const |
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.
Definition at line 965 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_cache_local_entries | ( | bool | cache_local_entries | ) |
| cacheLocalEntries | True to cache local entries also. |
Definition at line 998 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_eviction_config | ( | const eviction_config & | eviction_config | ) |
Sets the eviction configuration.
| evictionConfig | The eviction configuration. |
Definition at line 1025 of file config.cpp.
|
virtual |
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. |
Definition at line 984 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_invalidate_on_change | ( | bool | invalidate_on_change | ) |
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. |
Definition at line 971 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_local_update_policy | ( | const local_update_policy & | local_update_policy | ) |
Definition at line 1011 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_max_idle_seconds | ( | int32_t | max_idle_seconds | ) |
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 INT32_MAX. Default is 0.
| maxIdleSeconds | Maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). |
Definition at line 957 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_name | ( | const std::string & | name | ) |
Sets the name of the Near Cache.
| name | The name of the Near Cache. |
Definition at line 930 of file config.cpp.
| near_cache_config & hazelcast::client::config::near_cache_config::set_time_to_live_seconds | ( | int32_t | time_to_live_seconds | ) |
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 INT32_MAX. 0 means infinite. Default is 0.
| timeToLiveSeconds | The maximum number of seconds for each entry to stay in the Near Cache. |
Definition at line 943 of file config.cpp.
|
friend |
Definition at line 1031 of file config.cpp.
|
staticconstexpr |
Default value of the idle time for eviction in seconds.
Definition at line 44 of file near_cache_config.h.
|
staticconstexpr |
Default value for the in-memory format.
Definition at line 49 of file near_cache_config.h.
|
staticconstexpr |
Default value of the time to live in seconds.
Definition at line 39 of file near_cache_config.h.