![]() |
Hazelcast C++ Client
Hazelcast C++ Client Library
|
Concurrent, distributed, observable and queryable map client. More...
#include <imap.h>
Public Member Functions | |
imap (const std::string &instance_name, spi::ClientContext *context) | |
template<typename K> | |
boost::future< bool > | contains_key (const K &key) |
check if this map contains key. | |
template<typename V> | |
boost::future< bool > | contains_value (const V &value) |
check if this map contains value. | |
template<typename K, typename V> | |
boost::future< boost::optional< V > > | get (const K &key) |
get the value. | |
template<typename K, typename V, typename R = V> | |
boost::future< boost::optional< R > > | put (const K &key, const V &value) |
put new entry into map. | |
template<typename K, typename V, typename R = V> | |
boost::future< boost::optional< R > > | put (const K &key, const V &value, std::chrono::milliseconds ttl) |
Puts an entry into this map with a given ttl (time to live) value. | |
template<typename K, typename V> | |
boost::future< boost::optional< V > > | remove (const K &key) |
remove entry form map | |
template<typename K, typename V> | |
boost::future< bool > | remove (const K &key, const V &value) |
removes entry from map if there is an entry with same key and value. | |
template<typename P> | |
boost::future< void > | remove_all (const P &predicate) |
Removes all entries which match with the supplied predicate. | |
template<typename K> | |
boost::future< void > | delete_entry (const K &key) |
removes entry from map. | |
template<typename K> | |
boost::future< bool > | try_remove (const K &key, std::chrono::milliseconds timeout) |
Tries to remove the entry with the given key from this map within specified timeout value. | |
template<typename K, typename V> | |
boost::future< bool > | try_put (const K &key, const V &value, std::chrono::milliseconds timeout) |
Tries to put the given key, value into this map within specified timeout value. | |
template<typename K, typename V> | |
boost::future< void > | put_transient (const K &key, const V &value, std::chrono::milliseconds ttl) |
Same as put(K, V, int64_t, TimeUnit) but MapStore, if defined, will not be called to store/persist the entry. | |
template<typename K, typename V, typename R = V> | |
boost::future< boost::optional< V > > | put_if_absent (const K &key, const V &value) |
Puts an entry into this map, if the specified key is not already associated with a value. | |
template<typename K, typename V, typename R = V> | |
boost::future< boost::optional< V > > | put_if_absent (const K &key, const V &value, std::chrono::milliseconds ttl) |
Puts an entry into this map with a given ttl (time to live) value if the specified key is not already associated with a value. | |
template<typename K, typename V, typename N = V> | |
boost::future< bool > | replace (const K &key, const V &old_value, const N &new_value) |
Replaces the entry for a key only if currently mapped to a given value. | |
template<typename K, typename V, typename R = V> | |
boost::future< boost::optional< R > > | replace (const K &key, const V &value) |
Replaces the entry for a key only if currently mapped to some value. | |
template<typename K, typename V, typename R = V> | |
boost::future< void > | set (const K &key, const V &value) |
Puts an entry into this map. | |
template<typename K, typename V> | |
boost::future< void > | set (const K &key, const V &value, std::chrono::milliseconds ttl) |
Puts an entry into this map. | |
template<typename K> | |
boost::future< void > | lock (const K &key) |
Acquires the lock for the specified key. | |
template<typename K> | |
boost::future< void > | lock (const K &key, std::chrono::milliseconds lease_time) |
Acquires the lock for the specified key for the specified lease time. | |
template<typename K> | |
boost::future< bool > | is_locked (const K &key) |
Checks the lock for the specified key. | |
template<typename K> | |
boost::future< bool > | try_lock (const K &key) |
Tries to acquire the lock for the specified key. | |
template<typename K> | |
boost::future< bool > | try_lock (const K &key, std::chrono::milliseconds timeout) |
Tries to acquire the lock for the specified key. | |
template<typename K> | |
boost::future< bool > | try_lock (const K &key, std::chrono::milliseconds timeout, std::chrono::milliseconds lease_time) |
Tries to acquire the lock for the specified key for the specified lease time. | |
template<typename K> | |
boost::future< void > | unlock (const K &key) |
Releases the lock for the specified key. | |
template<typename K> | |
boost::future< void > | force_unlock (const K &key) |
Releases the lock for the specified key regardless of the lock owner. | |
template<typename MapInterceptor> | |
boost::future< std::string > | add_interceptor (const MapInterceptor &interceptor) |
Adds an interceptor for this map. | |
boost::future< boost::uuids::uuid > | add_entry_listener (entry_listener &&listener, bool include_value) |
Adds an entry listener for this map. | |
template<typename P> | |
boost::future< boost::uuids::uuid > | add_entry_listener (entry_listener &&listener, const P &predicate, bool include_value) |
Adds an entry listener for this map. | |
template<typename K> | |
boost::future< boost::uuids::uuid > | add_entry_listener (entry_listener &&listener, bool include_value, const K &key) |
Adds the specified entry listener for the specified key. | |
template<typename K, typename V> | |
boost::future< boost::optional< entry_view< K, V > > > | get_entry_view (const K &key) |
Returns the EntryView for the specified key. | |
template<typename K> | |
boost::future< bool > | evict (const K &key) |
Evicts the specified key from this map. | |
template<typename K, typename V> | |
boost::future< std::unordered_map< K, V > > | get_all (const std::unordered_set< K > &keys) |
Returns the entries for the given keys. | |
template<typename K> | |
boost::future< std::vector< K > > | key_set () |
Returns a vector clone of the keys contained in this map. | |
template<typename K, typename P, class = typename std::enable_if< !std::is_base_of<query::paging_predicate_marker, P>::value>::type> | |
boost::future< std::vector< K > > | key_set (const P &predicate) |
Queries the map based on the specified predicate and returns the keys of matching entries. | |
template<typename K, typename V> | |
boost::future< std::vector< K > > | key_set (query::paging_predicate< K, V > &predicate) |
Queries the map based on the specified predicate and returns the keys of matching entries. | |
template<typename V> | |
boost::future< std::vector< V > > | values () |
Returns a vector clone of the values contained in this map. | |
template<typename V, typename P, class = typename std::enable_if< !std::is_base_of<query::paging_predicate_marker, P>::value>::type> | |
boost::future< std::vector< V > > | values (const P &predicate) |
Returns a vector clone of the values contained in this map. | |
template<typename K, typename V> | |
boost::future< std::vector< V > > | values (query::paging_predicate< K, V > &predicate) |
Returns a vector clone of the values contained in this map. | |
template<typename K, typename V> | |
boost::future< std::vector< std::pair< K, V > > > | entry_set () |
Returns a std::vector< std::pair<K, V> > clone of the mappings contained in this map. | |
template<typename K, typename V, typename P, class = typename std::enable_if< !std::is_base_of<query::paging_predicate_marker, P>::value>::type> | |
boost::future< std::vector< std::pair< K, V > > > | entry_set (const P &predicate) |
Queries the map based on the specified predicate and returns the matching entries. | |
template<typename K, typename V> | |
boost::future< std::vector< std::pair< K, V > > > | entry_set (query::paging_predicate< K, V > &predicate) |
Queries the map based on the specified predicate and returns the matching entries. | |
boost::future< void > | add_index (const config::index_config &config) |
Adds an index to this map for the specified entries so that queries can run faster. | |
template<typename... T> | |
boost::future< void > | add_index (config::index_config::index_type type, T... attributes) |
Convenient method to add an index to this map with the given type and attributes. | |
boost::future< void > | clear () |
template<typename K, typename ResultType, typename EntryProcessor> | |
boost::future< boost::optional< ResultType > > | execute_on_key (const K &key, const EntryProcessor &entry_processor) |
Applies the user defined EntryProcessor to the entry mapped by the key. | |
template<typename K, typename ResultType, typename EntryProcessor> | |
boost::future< boost::optional< ResultType > > | submit_to_key (const K &key, const EntryProcessor &entry_processor) |
Applies the user defined EntryProcessor to the entry mapped by the key. | |
template<typename K, typename ResultType, typename EntryProcessor> | |
boost::future< std::unordered_map< K, boost::optional< ResultType > > > | execute_on_keys (const std::unordered_set< K > &keys, const EntryProcessor &entry_processor) |
Applies the user defined EntryProcessor to the entries mapped by the collection of keys. | |
template<typename K, typename ResultType, typename EntryProcessor> | |
boost::future< std::unordered_map< K, boost::optional< ResultType > > > | execute_on_entries (const EntryProcessor &entry_processor) |
Applies the user defined EntryProcessor to the all entries in the map. | |
template<typename K, typename ResultType, typename EntryProcessor, typename P> | |
boost::future< std::unordered_map< K, boost::optional< ResultType > > > | execute_on_entries (const EntryProcessor &entry_processor, const P &predicate) |
Applies the user defined EntryProcessor to the all entries in the map. | |
template<typename K, typename V> | |
boost::future< void > | put_all (const std::unordered_map< K, V > &entries) |
Copies all of the mappings from the specified map to this map (optional operation). | |
monitor::local_map_stats & | get_local_map_stats () |
Returns LocalMapStats for this map. | |
template<typename K, typename V> | |
query::paging_predicate< K, V > | new_paging_predicate (size_t predicate_page_size) |
template<typename K, typename V, typename INNER_PREDICATE> | |
query::paging_predicate< K, V > | new_paging_predicate (size_t predicate_page_size, const INNER_PREDICATE &predicate) |
template<typename K, typename V, typename COMPARATOR> | |
query::paging_predicate< K, V > | new_paging_predicate (COMPARATOR &&comparator, size_t predicate_page_size) |
template<typename K, typename V, typename INNER_PREDICATE, typename COMPARATOR> | |
query::paging_predicate< K, V > | new_paging_predicate (const INNER_PREDICATE &predicate, COMPARATOR &&comparator, size_t predicate_page_size) |
Static Public Attributes | |
static constexpr const char * | SERVICE_NAME = "hz:impl:mapService" |
Protected Member Functions | |
virtual boost::future< boost::optional< serialization::pimpl::data > > | get_internal (const serialization::pimpl::data &key_data) |
virtual boost::future< bool > | contains_key_internal (const serialization::pimpl::data &key_data) |
virtual boost::future< boost::optional< serialization::pimpl::data > > | remove_internal (const serialization::pimpl::data &key_data) |
virtual boost::future< bool > | remove_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data) |
virtual boost::future< protocol::ClientMessage > | remove_all_internal (const serialization::pimpl::data &predicate_data) |
virtual boost::future< protocol::ClientMessage > | delete_internal (const serialization::pimpl::data &key_data) |
virtual boost::future< bool > | try_remove_internal (const serialization::pimpl::data &key_data, std::chrono::milliseconds timeout) |
virtual boost::future< bool > | try_put_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, std::chrono::milliseconds timeout) |
virtual boost::future< boost::optional< serialization::pimpl::data > > | put_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, std::chrono::milliseconds ttl) |
virtual boost::future< protocol::ClientMessage > | try_put_transient_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, std::chrono::milliseconds ttl) |
virtual boost::future< boost::optional< serialization::pimpl::data > > | put_if_absent_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, std::chrono::milliseconds ttl) |
virtual boost::future< bool > | replace_if_same_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, const serialization::pimpl::data &new_value_data) |
virtual boost::future< boost::optional< serialization::pimpl::data > > | replace_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data) |
virtual boost::future< protocol::ClientMessage > | set_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &value_data, std::chrono::milliseconds ttl) |
virtual boost::future< bool > | evict_internal (const serialization::pimpl::data &key_data) |
virtual boost::future< EntryVector > | get_all_internal (int partition_id, const std::vector< serialization::pimpl::data > &partition_keys) |
virtual boost::future< boost::optional< serialization::pimpl::data > > | execute_on_key_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &processor) |
boost::future< boost::optional< serialization::pimpl::data > > | submit_to_key_internal (const serialization::pimpl::data &key_data, const serialization::pimpl::data &processor) |
template<typename K, typename EntryProcessor> | |
boost::future< EntryVector > | execute_on_keys_internal (const std::unordered_set< K > &keys, const EntryProcessor &entry_processor) |
virtual boost::future< protocol::ClientMessage > | put_all_internal (int partition_id, const EntryVector &entries) |
Protected Attributes | |
monitor::impl::LocalMapStatsImpl | local_map_stats_ |
Static Protected Attributes | |
static const std::chrono::milliseconds | UNSET { -1 } |
Default TTL value of a record. |
Friends | |
class | spi::ProxyManager |
Concurrent, distributed, observable and queryable map client.
Notice that this class have a private constructor. You can access get an IMap in the following way
auto client = new_client().get(); auto imap = client.get_map("aMap").get();
|
inline |
|
inline |
Adds an entry listener for this map.
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. otherwise it will slow down the system.
Warning 2: Do not make a call to hazelcast. It can cause deadlock.
listener | entry listener |
includeValue | true if EntryEvent should contain the value. |
Definition at line 531 of file imap.h.
|
inline |
Adds the specified entry listener for the specified key.
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. otherwise it will slow down the system.
Warning 2: Do not make a call to hazelcast. It can cause deadlock.
listener | entry listener |
key | key to listen |
includeValue | true if EntryEvent should contain the value. |
Definition at line 603 of file imap.h.
|
inline |
Adds an entry listener for this map.
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. otherwise it will slow down the system.
Warning 2: Do not make a call to hazelcast. It can cause deadlock.
listener | entry listener |
predicate | The query filter to use when returning the events to the user. |
includeValue | true if EntryEvent should contain the value. |
Definition at line 568 of file imap.h.
|
inline |
Convenient method to add an index to this map with the given type and attributes.
Attributes are indexed in ascending order.
type | Index type. |
attributes | Attributes to be indexed. |
Definition at line 914 of file imap.h.
|
inline |
Adds an index to this map for the specified entries so that queries can run faster.
Let's say your map values are Employee objects.
struct Employee { bool active; int32_t age; std::string name; // other fields }
If you are querying your values mostly based on age and active then you may consider indexing these fields.
auto imap = client.getMap("employees"); imap.addIndex(config::index_config(config::index_config::index_type::SORTED, "age")); // Sorted index for range queries imap.addIndex(config::index_config(config::index_config::index_type::HASH, "active")); // Sorted index for range queries
Index attribute should either have a getter method or be public. You should also make sure to add the indexes before adding entries to this map.
Time to Index
Indexing time is executed in parallel on each partition by operation threads. The Map is not blocked during this operation.
The time taken in proportional to the size of the Map and the number Members.
Searches while indexes are being built
Until the index finishes being created, any searches for the attribute will use a full Map scan, thus avoiding using a partially built index and returning incorrect results.
config | Index configuration. |
Definition at line 901 of file imap.h.
|
inline |
Adds an interceptor for this map.
Added interceptor will intercept operations and execute user defined methods and will cancel operations if user defined method throw exception.
Interceptor should be serializable. Notice that map interceptor runs on the nodes. Because of that same class should be implemented in java side with same classId and factoryId.
interceptor | map interceptor |
Definition at line 510 of file imap.h.
|
inline |
|
inline |
|
inlineprotectedvirtual |
|
inline |
|
inline |
|
inlineprotectedvirtual |
|
inline |
Returns a std::vector< std::pair<K, V> > clone of the mappings contained in this map.
The vector is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.
Definition at line 812 of file imap.h.
|
inline |
Queries the map based on the specified predicate and returns the matching entries.
Specified predicate runs on all members in parallel.
predicate | query criteria |
Definition at line 833 of file imap.h.
|
inline |
Queries the map based on the specified predicate and returns the matching entries.
Specified predicate runs on all members in parallel.
predicate | query criteria |
Definition at line 850 of file imap.h.
|
inline |
Evicts the specified key from this map.
If a MapStore defined for this map, then the entry is not deleted from the underlying MapStore, evict only removes the entry from the memory.
key | key to evict |
Definition at line 651 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Applies the user defined EntryProcessor to the all entries in the map.
Returns the results mapped by each key in the map.
EntryProcessor should be serializable. Notice that map EntryProcessor runs on the nodes. Because of that, same class should be implemented in java side with same classId and factoryId.
ResultType | that entry processor will return |
EntryProcessor | type of entry processor class |
entryProcessor | that will be applied |
Definition at line 1005 of file imap.h.
|
inline |
Applies the user defined EntryProcessor to the all entries in the map.
Returns the results mapped by each key in the map.
EntryProcessor should be serializable. Notice that map EntryProcessor runs on the nodes. Because of that, same class should be implemented in java side with same classId and factoryId.
ResultType | that entry processor will return |
EntryProcessor | type of entry processor class |
predicate | The filter to apply for selecting the entries at the server side. |
entryProcessor | that will be applied |
Definition at line 1031 of file imap.h.
|
inline |
Applies the user defined EntryProcessor to the entry mapped by the key.
Returns the the ResultType which is result of the process() method of EntryProcessor.
EntryProcessor should be serializable. Notice that map EntryProcessor runs on the nodes. Because of that, same class should be implemented in java side with same classId and factoryId.
EntryProcessor | type of entry processor class |
ResultType | that entry processor will return |
entryProcessor | that will be applied |
key | of entry that entryProcessor will be applied on |
Definition at line 942 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Applies the user defined EntryProcessor to the entries mapped by the collection of keys.
Returns the results mapped by each key in the map.
Notice that map EntryProcessor runs on the nodes. Because of that, same class should be implemented in java side
ResultType | that entry processor will return |
EntryProcessor | type of entry processor class |
keys | The keys for which the entry processor will be applied. |
entryProcessor | that will be applied |
Definition at line 983 of file imap.h.
|
inlineprotected |
Definition at line 1267 of file imap.h.
|
inline |
|
inline |
|
inline |
Returns the entries for the given keys.
keys | keys to get |
Definition at line 663 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Returns the EntryView for the specified key.
key | key of the entry |
Definition at line 633 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Returns LocalMapStats for this map.
LocalMapStats is the statistics for the local portion of this distributed map and contains information such as ownedEntryCount backupEntryCount, lastUpdateTime, lockedEntryCount.
Since this stats are only for the local portion of this map, if you need the cluster-wide MapStats then you need to get the LocalMapStats from all members of the cluster and combine them.
Definition at line 1088 of file imap.h.
|
inline |
|
inline |
Returns a vector clone of the keys contained in this map.
The vector is NOT backed by the map, so changes to the map are NOT reflected in the vector, and vice-versa.
Definition at line 698 of file imap.h.
|
inline |
Queries the map based on the specified predicate and returns the keys of matching entries.
Specified predicate runs on all members in parallel.
predicate | query criteria |
Definition at line 719 of file imap.h.
|
inline |
Queries the map based on the specified predicate and returns the keys of matching entries.
Specified predicate runs on all members in parallel.
predicate | query criteria |
Definition at line 737 of file imap.h.
|
inline |
Acquires the lock for the specified key.
If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.
Scope of the lock is this map only. Acquired lock is only for the key in this map.
Locks are re-entrant so if the key is locked N times then it should be unlocked N times before another thread can acquire it.
key | key to lock. |
Definition at line 357 of file imap.h.
|
inline |
Acquires the lock for the specified key for the specified lease time.
After lease time, lock will be released..
If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.
Scope of the lock is this map only. Acquired lock is only for the key in this map.
Locks are re-entrant so if the key is locked N times then it should be unlocked N times before another thread can acquire it.
key | key to lock. |
leaseTime | time to wait before releasing the lock. |
Definition at line 381 of file imap.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
put new entry into map.
key | |
value |
Definition at line 115 of file imap.h.
|
inline |
Puts an entry into this map with a given ttl (time to live) value.
Entry will expire and get evicted after the ttl. If ttl is 0, then the entry lives forever.
key | key of the entry |
value | value of the entry |
ttl | maximum time for this entry to stay in the map. 0 means infinite. |
Definition at line 133 of file imap.h.
|
inline |
Copies all of the mappings from the specified map to this map (optional operation).
The effect of this call is equivalent to that of calling put(k, v) on this map once for each mapping from key k to value v in the specified map. The behavior of this operation is undefined if the specified map is modified while the operation is in progress.
entries | mappings to be stored in this map |
Definition at line 1050 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Puts an entry into this map, if the specified key is not already associated with a value.
key | key with which the specified value is to be associated |
value |
Definition at line 258 of file imap.h.
|
inline |
Puts an entry into this map with a given ttl (time to live) value if the specified key is not already associated with a value.
Entry will expire and get evicted after the ttl.
key | key of the entry |
value | value of the entry |
ttl | maximum time for this entry to stay in the map |
Definition at line 277 of file imap.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
Same as put(K, V, int64_t, TimeUnit) but MapStore, if defined, will not be called to store/persist the entry.
If ttl is 0, then the entry lives forever.
key | key of the entry |
value | value of the entry |
ttl | maximum time for this entry to stay in the map in milliseconds, 0 means infinite. |
Definition at line 240 of file imap.h.
|
inline |
|
inline |
removes entry from map if there is an entry with same key and value.
key | key of the entry to be removed |
value | value of the entry to be removed |
Definition at line 160 of file imap.h.
|
inline |
Removes all entries which match with the supplied predicate.
If this map has index, matching entries will be found via index search, otherwise they will be found by full-scan.
Note that calling this method also removes all entries from callers Near Cache.
predicate | matching entries with this predicate will be removed from this map |
Definition at line 177 of file imap.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
Replaces the entry for a key only if currently mapped to a given value.
key | key with which the specified value is associated |
oldValue | value expected to be associated with the specified key |
newValue |
Definition at line 291 of file imap.h.
|
inline |
Replaces the entry for a key only if currently mapped to some value.
key | key with which the specified value is associated |
value |
Definition at line 307 of file imap.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
Puts an entry into this map.
Similar to put operation except that set doesn't return the old value which is more efficient.
key | |
value |
Definition at line 320 of file imap.h.
|
inline |
Puts an entry into this map.
Similar to put operation except that set doesn't return the old value which is more efficient.
key | key with which the specified value is associated |
value | |
ttl | maximum time in milliseconds for this entry to stay in the map 0 means infinite. |
Definition at line 335 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Applies the user defined EntryProcessor to the entry mapped by the key.
Returns immediately with a Future representing that task.
key | key to be processed |
entryProcessor | processor to process the key |
Definition at line 960 of file imap.h.
|
inlineprotected |
|
inline |
Tries to acquire the lock for the specified key.
If the lock is not available then the current thread doesn't wait and returns false immediately.
key | key to lock. |
Definition at line 410 of file imap.h.
|
inline |
Tries to acquire the lock for the specified key.
If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens:
key | key to lock in this map |
timeout | maximum time in milliseconds to wait for the lock |
Definition at line 432 of file imap.h.
|
inline |
Tries to acquire the lock for the specified key for the specified lease time.
After lease time, the lock will be released.
If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens:
key | key to lock in this map |
timeout | maximum time to wait for the lock |
leaseTime | time to wait before releasing the lock. |
Definition at line 456 of file imap.h.
|
inline |
Tries to put the given key, value into this map within specified timeout value.
If this method returns false, it means that the caller thread couldn't acquire the lock for the key within timeout duration, thus put operation is not successful.
key | key of the entry |
value | value of the entry |
timeout | maximum time to wait |
Definition at line 222 of file imap.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
Tries to remove the entry with the given key from this map within specified timeout value.
If the key is already locked by another thread and/or member, then this operation will wait timeout amount for acquiring the lock.
key | key of the entry |
timeout | maximum time to wait for acquiring the lock for the key |
Definition at line 203 of file imap.h.
|
inlineprotectedvirtual |
|
inline |
Releases the lock for the specified key.
It never blocks and returns immediately.
If the current thread is the holder of this lock then the hold count is decremented. If the hold count is now zero then the lock is released. If the current thread is not the holder of this lock then illegal_monitor_state is thrown.
key | key to lock. |
illegal_monitor_state | if the current thread does not hold this lock MTODO |
Definition at line 478 of file imap.h.
|
inline |
Returns a vector clone of the values contained in this map.
The vector is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.
Definition at line 757 of file imap.h.
|
inline |
Returns a vector clone of the values contained in this map.
The vector is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.
predicate | the criteria for values to match |
Definition at line 776 of file imap.h.
|
inline |
Returns a vector clone of the values contained in this map.
The vector is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.
predicate | the criteria for values to match |
Definition at line 793 of file imap.h.
|
protected |
|
staticconstexpr |
|
staticprotected |