16 #ifndef HAZELCAST_CLIENT_MIXEDTYPE_ISET_H_
17 #define HAZELCAST_CLIENT_MIXEDTYPE_ISET_H_
19 #include "hazelcast/client/proxy/ISetImpl.h"
20 #include "hazelcast/client/impl/ItemEventHandler.h"
21 #include "hazelcast/client/protocol/codec/SetAddListenerCodec.h"
23 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25 #pragma warning(disable: 4251) //for dll export
36 class HAZELCAST_API
ISet :
public proxy::ISetImpl {
59 bool removeItemListener(
const std::string ®istrationId);
81 return proxy::ISetImpl::contains(toData(element));
88 std::vector<TypedData> toArray();
97 bool add(
const E &element) {
98 return proxy::ISetImpl::add(toData(element));
107 template <
typename E>
108 bool remove(
const E &element) {
109 return proxy::ISetImpl::remove(toData(element));
118 template <
typename E>
120 return proxy::ISetImpl::containsAll(toDataCollection(elements));
129 template <
typename E>
130 bool addAll(
const std::vector<E> &elements) {
131 std::vector<serialization::pimpl::Data> dataCollection = toDataCollection(elements);
132 return proxy::ISetImpl::addAll(toDataCollection(elements));
141 template <
typename E>
143 std::vector<serialization::pimpl::Data> dataCollection = toDataCollection(elements);
144 return proxy::ISetImpl::removeAll(dataCollection);
154 template <
typename E>
156 return proxy::ISetImpl::retainAll(toDataCollection(elements));
166 ISet(
const std::string &instanceName, spi::ClientContext *context);
172 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
bool contains(const E &element)
Definition: ISet.h:80
bool containsAll(const std::vector< E > &elements)
Definition: ISet.h:119
bool removeAll(const std::vector< E > &elements)
Definition: ISet.h:142
Concurrent, distributed client implementation of std::unordered_set.
Definition: ISet.h:36
bool addAll(const std::vector< E > &elements)
Definition: ISet.h:130
bool add(const E &element)
Definition: ISet.h:97
bool retainAll(const std::vector< E > &elements)
Removes the elements from this set that are not available in given "elements" vector.
Definition: ISet.h:155
Item listener for IQueue, ISet and IList.
Definition: ItemListener.h:40
Definition: MapEntryView.h:32
Hazelcast Client enables you to do all Hazelcast operations without being a member of the cluster...
Definition: HazelcastClient.h:459