Concurrent, distributed client implementation of std::unordered_set.
More...
#include <iset.h>
|
boost::future< boost::uuids::uuid > | add_item_listener (item_listener &&listener, bool include_value) |
| Warning 1: If listener should do a time consuming operation, off-load the operation to another thread.
|
template<typename E> |
boost::future< bool > | contains (const E &element) |
template<typename E> |
boost::future< std::vector< E > > | to_array () |
template<typename E> |
boost::future< bool > | add (const E &element) |
template<typename E> |
boost::future< bool > | remove (const E &element) |
template<typename E> |
boost::future< bool > | contains_all (const std::vector< E > &elements) |
template<typename E> |
boost::future< bool > | add_all (const std::vector< E > &elements) |
template<typename E> |
boost::future< bool > | remove_all (const std::vector< E > &elements) |
template<typename E> |
boost::future< bool > | retain_all (const std::vector< E > &elements) |
| Removes the elements from this set that are not available in given "elements" vector.
|
|
static constexpr const char * | SERVICE_NAME = "hz:impl:setService" |
Concurrent, distributed client implementation of std::unordered_set.
Definition at line 28 of file iset.h.
◆ add()
template<typename E>
boost::future< bool > hazelcast::client::iset::add |
( |
const E & | element | ) |
|
|
inline |
- Parameters
-
- Returns
- true if element is added successfully. If elements was already there returns false.
Definition at line 93 of file iset.h.
94 {
95 return proxy::ISetImpl::add(to_data(element));
96 }
◆ add_all()
template<typename E>
boost::future< bool > hazelcast::client::iset::add_all |
( |
const std::vector< E > & | elements | ) |
|
|
inline |
- Parameters
-
- Returns
- true if all elements given in vector can be added to set.
Definition at line 126 of file iset.h.
127 {
128 std::vector<serialization::pimpl::data> dataCollection =
129 to_data_collection(elements);
130 return proxy::ISetImpl::add_all(to_data_collection(elements));
131 }
◆ add_item_listener()
boost::future< boost::uuids::uuid > hazelcast::client::iset::add_item_listener |
( |
item_listener && | listener, |
|
|
bool | include_value ) |
|
inline |
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.
- Parameters
-
listener | to be added |
includeValue | boolean value representing value should be included in incoming ItemEvent or not. |
- Returns
- registrationId that can be used to remove item listener
Definition at line 46 of file iset.h.
49 {
50 std::unique_ptr<
51 impl::item_event_handler<protocol::codec::set_addlistener_handler>>
52 itemEventHandler(new impl::item_event_handler<
53 protocol::codec::set_addlistener_handler>(
54 get_name(),
55 get_context().get_logger(),
56 get_context().get_client_cluster_service(),
57 get_context().get_serialization_service(),
58 std::move(listener),
59 include_value));
60
61 return proxy::ISetImpl::add_item_listener(std::move(itemEventHandler),
62 include_value);
63 }
◆ contains()
template<typename E>
boost::future< bool > hazelcast::client::iset::contains |
( |
const E & | element | ) |
|
|
inline |
- Parameters
-
- Returns
- true if set contains element
Definition at line 71 of file iset.h.
72 {
73 return proxy::ISetImpl::contains(to_data(element));
74 }
◆ contains_all()
template<typename E>
boost::future< bool > hazelcast::client::iset::contains_all |
( |
const std::vector< E > & | elements | ) |
|
|
inline |
- Parameters
-
- Returns
- true if this set contains all elements given in vector.
Definition at line 115 of file iset.h.
116 {
117 return proxy::ISetImpl::contains_all(to_data_collection(elements));
118 }
◆ remove()
template<typename E>
boost::future< bool > hazelcast::client::iset::remove |
( |
const E & | element | ) |
|
|
inline |
- Parameters
-
- Returns
- true if element is removed successfully.
Definition at line 104 of file iset.h.
105 {
106 return proxy::ISetImpl::remove(to_data(element));
107 }
◆ remove_all()
template<typename E>
boost::future< bool > hazelcast::client::iset::remove_all |
( |
const std::vector< E > & | elements | ) |
|
|
inline |
- Parameters
-
- Returns
- true if all elements are removed successfully.
Definition at line 139 of file iset.h.
140 {
141 return proxy::ISetImpl::remove_all(to_data_collection(elements));
142 }
◆ retain_all()
template<typename E>
boost::future< bool > hazelcast::client::iset::retain_all |
( |
const std::vector< E > & | elements | ) |
|
|
inline |
Removes the elements from this set that are not available in given "elements" vector.
- Parameters
-
- Returns
- true if operation is successful.
Definition at line 152 of file iset.h.
153 {
154 return proxy::ISetImpl::retain_all(to_data_collection(elements));
155 }
◆ to_array()
template<typename E>
boost::future< std::vector< E > > hazelcast::client::iset::to_array |
( |
| ) |
|
|
inline |
- Returns
- all elements as std::vector
Definition at line 81 of file iset.h.
82 {
83 return to_object_vector<E>(proxy::ISetImpl::to_array_data());
84 }
◆ spi::ProxyManager
friend class spi::ProxyManager |
|
friend |
◆ SERVICE_NAME
const char* hazelcast::client::iset::SERVICE_NAME = "hz:impl:setService" |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- hazelcast/include/hazelcast/client/iset.h