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. More...
|
|
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. More...
|
|
|
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 79 of file iset.h.
80 return proxy::ISetImpl::add(to_data(element));
◆ 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 109 of file iset.h.
110 std::vector<serialization::pimpl::data> dataCollection = to_data_collection(elements);
111 return proxy::ISetImpl::add_all(to_data_collection(elements));
◆ 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 43 of file iset.h.
44 std::unique_ptr<impl::item_event_handler<protocol::codec::set_addlistener_handler>> itemEventHandler(
45 new impl::item_event_handler<protocol::codec::set_addlistener_handler>(
46 get_name(), get_context().get_client_cluster_service(),
47 get_context().get_serialization_service(),
51 return proxy::ISetImpl::add_item_listener(std::move(itemEventHandler), include_value);
◆ 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 60 of file iset.h.
61 return proxy::ISetImpl::contains(to_data(element));
◆ 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 99 of file iset.h.
100 return proxy::ISetImpl::contains_all(to_data_collection(elements));
◆ 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 89 of file iset.h.
90 return proxy::ISetImpl::remove(to_data(element));
◆ 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 120 of file iset.h.
121 return proxy::ISetImpl::remove_all(to_data_collection(elements));
◆ 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 131 of file iset.h.
132 return proxy::ISetImpl::retain_all(to_data_collection(elements));
◆ 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 69 of file iset.h.
70 return to_object_vector<E>(proxy::ISetImpl::to_array_data());
The documentation for this class was generated from the following file:
- hazelcast/include/hazelcast/client/iset.h