18#include "hazelcast/client/proxy/ISetImpl.h"
19#include "hazelcast/client/impl/ItemEventHandler.h"
20#include "hazelcast/client/protocol/codec/codecs.h"
28class HAZELCAST_API iset :
public proxy::ISetImpl
30 friend class spi::ProxyManager;
33 static constexpr const char* SERVICE_NAME =
"hz:impl:setService";
51 impl::item_event_handler<protocol::codec::set_addlistener_handler>>
52 itemEventHandler(
new impl::item_event_handler<
53 protocol::codec::set_addlistener_handler>(
55 get_context().get_logger(),
56 get_context().get_client_cluster_service(),
57 get_context().get_serialization_service(),
61 return proxy::ISetImpl::add_item_listener(std::move(itemEventHandler),
73 return proxy::ISetImpl::contains(to_data(element));
83 return to_object_vector<E>(proxy::ISetImpl::to_array_data());
93 boost::future<bool>
add(
const E& element)
95 return proxy::ISetImpl::add(to_data(element));
104 boost::future<bool>
remove(
const E& element)
106 return proxy::ISetImpl::remove(to_data(element));
117 return proxy::ISetImpl::contains_all(to_data_collection(elements));
126 boost::future<bool>
add_all(
const std::vector<E>& elements)
128 std::vector<serialization::pimpl::data> dataCollection =
129 to_data_collection(elements);
130 return proxy::ISetImpl::add_all(to_data_collection(elements));
139 boost::future<bool>
remove_all(
const std::vector<E>& elements)
141 return proxy::ISetImpl::remove_all(to_data_collection(elements));
152 boost::future<bool>
retain_all(
const std::vector<E>& elements)
154 return proxy::ISetImpl::retain_all(to_data_collection(elements));
158 iset(
const std::string& instance_name, spi::ClientContext* context)
159 : proxy::ISetImpl(instance_name, context)
Concurrent, distributed client implementation of std::unordered_set.
boost::future< bool > remove(const E &element)
boost::future< std::vector< E > > to_array()
boost::future< bool > add_all(const std::vector< E > &elements)
boost::future< bool > remove_all(const std::vector< E > &elements)
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...
boost::future< bool > contains(const E &element)
boost::future< bool > add(const E &element)
boost::future< bool > retain_all(const std::vector< E > &elements)
Removes the elements from this set that are not available in given "elements" vector.
boost::future< bool > contains_all(const std::vector< E > &elements)
Item listener for IQueue, ISet and IList.