Hazelcast C++ Client
Public Member Functions | Friends | List of all members
hazelcast::client::ISet< E > Class Template Reference

Concurrent, distributed client implementation of std::unordered_set. More...

#include <ISet.h>

+ Inheritance diagram for hazelcast::client::ISet< E >:

Public Member Functions

std::string addItemListener (ItemListener< E > &listener, bool includeValue)
 Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. More...
 
bool removeItemListener (const std::string &registrationId)
 Removes the specified item listener. More...
 
int size ()
 
bool isEmpty ()
 
bool contains (const E &element)
 
std::vector< E > toArray ()
 
bool add (const E &element)
 
bool remove (const E &element)
 
bool containsAll (const std::vector< E > &elements)
 
bool addAll (const std::vector< E > &elements)
 
bool removeAll (const std::vector< E > &elements)
 
bool retainAll (const std::vector< E > &elements)
 Removes the elements from this set that are not available in given "elements" vector. More...
 
void clear ()
 Removes all elements from set.
 

Friends

class HazelcastClient
 
class adaptor::RawPointerSet< E >
 

Detailed Description

template<typename E>
class hazelcast::client::ISet< E >

Concurrent, distributed client implementation of std::unordered_set.

Template Parameters
Eitem type

Member Function Documentation

template<typename E>
bool hazelcast::client::ISet< E >::add ( const E &  element)
inline
Parameters
elementto be added
Returns
true if element is added successfully. If elements was already there returns false.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
bool hazelcast::client::ISet< E >::addAll ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if all elements given in vector can be added to set.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
std::string hazelcast::client::ISet< E >::addItemListener ( ItemListener< E > &  listener,
bool  includeValue 
)
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
listenerto be added
includeValueboolean value representing value should be included in incoming ItemEvent or not.
Returns
registrationId that can be used to remove item listener
template<typename E>
bool hazelcast::client::ISet< E >::contains ( const E &  element)
inline
Parameters
elementto be searched
Returns
true if set contains element
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
bool hazelcast::client::ISet< E >::containsAll ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if this set contains all elements given in vector.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
bool hazelcast::client::ISet< E >::isEmpty ( )
inline
Returns
true if empty
template<typename E>
bool hazelcast::client::ISet< E >::remove ( const E &  element)
inline
Parameters
elementto be removed
Returns
true if element is removed successfully.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
bool hazelcast::client::ISet< E >::removeAll ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if all elements are removed successfully.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
bool hazelcast::client::ISet< E >::removeItemListener ( const std::string &  registrationId)
inline

Removes the specified item listener.

Returns false if the specified listener is not added before.

Parameters
registrationIdId of listener registration.
Returns
true if registration is removed, false otherwise
template<typename E>
bool hazelcast::client::ISet< E >::retainAll ( const std::vector< E > &  elements)
inline

Removes the elements from this set that are not available in given "elements" vector.

Parameters
elementsstd::vector<E>
Returns
true if operation is successful.
Exceptions
IClassCastExceptionif the type of the specified element is incompatible with the server side.
template<typename E>
int hazelcast::client::ISet< E >::size ( )
inline
Returns
size of the distributed set
template<typename E>
std::vector<E> hazelcast::client::ISet< E >::toArray ( )
inline
Returns
all elements as std::vector

The documentation for this class was generated from the following file: