Hazelcast C++ Client
Public Member Functions | Static Public Attributes | Friends | List of all members
hazelcast::client::iset Class Reference

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

#include <iset.h>

+ Inheritance diagram for hazelcast::client::iset:

Public Member Functions

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 Public Attributes

static constexpr const char * SERVICE_NAME = "hz:impl:setService"
 

Friends

class spi::ProxyManager
 

Detailed Description

Concurrent, distributed client implementation of std::unordered_set.

Member Function Documentation

◆ add()

template<typename E >
boost::future<bool> hazelcast::client::iset::add ( const E &  element)
inline
Parameters
elementto be added
Returns
true if element is added successfully. If elements was already there returns false.

◆ add_all()

template<typename E >
boost::future<bool> hazelcast::client::iset::add_all ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if all elements given in vector can be added to set.

◆ 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
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

◆ contains()

template<typename E >
boost::future<bool> hazelcast::client::iset::contains ( const E &  element)
inline
Parameters
elementto be searched
Returns
true if set contains element

◆ contains_all()

template<typename E >
boost::future<bool> hazelcast::client::iset::contains_all ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if this set contains all elements given in vector.

◆ remove()

template<typename E >
boost::future<bool> hazelcast::client::iset::remove ( const E &  element)
inline
Parameters
elementto be removed
Returns
true if element is removed successfully.

◆ remove_all()

template<typename E >
boost::future<bool> hazelcast::client::iset::remove_all ( const std::vector< E > &  elements)
inline
Parameters
elementsstd::vector<E>
Returns
true if all elements are removed successfully.

◆ 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
elementsstd::vector<E>
Returns
true if operation is successful.

◆ to_array()

template<typename E >
boost::future<std::vector<E> > hazelcast::client::iset::to_array ( )
inline
Returns
all elements as std::vector

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