Concurrent, blocking, distributed, observable, client queue.  
 More...
#include <iqueue.h>
|  | 
| boost::future< boost::uuids::uuid > | add_item_listener (item_listener &&listener, bool include_value) | 
|  | Adds an item listener for this collection.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< bool > | offer (const E &element) | 
|  | Inserts the specified element into this queue.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< void > | put (const E &element) | 
|  | Puts the element into queue.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< bool > | offer (const E &element, std::chrono::milliseconds timeout) | 
|  | Inserts the specified element into this queue.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< boost::optional< E > > | take () | 
|  | 
| template<typename E > | 
| boost::future< boost::optional< E > > | poll (std::chrono::milliseconds timeout) | 
|  | 
| template<typename E > | 
| boost::future< bool > | remove (const E &element) | 
|  | 
| template<typename E > | 
| boost::future< bool > | contains (const E &element) | 
|  | 
| template<typename E > | 
| boost::future< size_t > | drain_to (std::vector< E > &elements) | 
|  | Note that elements will be pushed_back to vector.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< size_t > | drain_to (std::vector< E > &elements, size_t max_elements) | 
|  | Note that elements will be pushed_back to vector.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< boost::optional< E > > | poll () | 
|  | Returns immediately without waiting.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< boost::optional< E > > | peek () | 
|  | Returns immediately without waiting.  More... 
 | 
|  | 
| template<typename E > | 
| boost::future< std::vector< E > > | to_array () | 
|  | 
| 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 queue that are not available in given "elements" vector.  More... 
 | 
|  | 
|  | 
| static constexpr const char * | SERVICE_NAME = "hz:impl:queueService" | 
|  | 
Concurrent, blocking, distributed, observable, client queue. 
Definition at line 29 of file iqueue.h.
◆ add_all()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::add_all | ( | const std::vector< E > & | elements | ) |  |  | inline | 
 
- Parameters
- 
  
  
- Returns
- true if all elements given in vector can be added to queue. 
Definition at line 231 of file iqueue.h.
  233         return proxy::IQueueImpl::add_all_data(to_data_collection(elements));
 
 
 
 
◆ add_item_listener()
  
  | 
        
          | boost::future<boost::uuids::uuid> hazelcast::client::iqueue::add_item_listener | ( | item_listener && | listener, |  
          |  |  | bool | include_value |  
          |  | ) |  |  |  | inline | 
 
Adds an item listener for this collection. 
Listener will get notified for all collection add/remove events.
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 | item listener |  | includeValue | trueupdated item should be passed to the item listener,falseotherwise. |  
 
- Returns
- returns registration id. 
Definition at line 50 of file iqueue.h.
   55           impl::item_event_handler<protocol::codec::queue_addlistener_handler>>
 
   56           itemEventHandler(
new impl::item_event_handler<
 
   57                            protocol::codec::queue_addlistener_handler>(
 
   59             get_context().get_client_cluster_service(),
 
   60             get_context().get_serialization_service(),
 
   64         return proxy::IQueueImpl::add_item_listener(std::move(itemEventHandler),
 
 
 
 
◆ contains()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::contains | ( | const E & | element | ) |  |  | inline | 
 
- Parameters
- 
  
  
- Returns
- true if queue contains the element. 
Definition at line 147 of file iqueue.h.
  149         return proxy::IQueueImpl::contains(to_data(element));
 
 
 
 
◆ contains_all()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::contains_all | ( | const std::vector< E > & | elements | ) |  |  | inline | 
 
- Parameters
- 
  
  
- Returns
- true if this queue contains all elements given in vector. 
Definition at line 219 of file iqueue.h.
  221         return proxy::IQueueImpl::contains_all_data(
 
  222           to_data_collection(elements));
 
 
 
 
◆ drain_to() [1/2]
template<typename E > 
  
  | 
        
          | boost::future<size_t> hazelcast::client::iqueue::drain_to | ( | std::vector< E > & | elements | ) |  |  | inline | 
 
Note that elements will be pushed_back to vector. 
- Parameters
- 
  
    | elements | the vector that elements will be drained to. |  
 
- Returns
- number of elements drained. 
Definition at line 159 of file iqueue.h.
  161         return to_object_drain(proxy::IQueueImpl::drain_to_data(), elements);
 
 
 
 
◆ drain_to() [2/2]
template<typename E > 
  
  | 
        
          | boost::future<size_t> hazelcast::client::iqueue::drain_to | ( | std::vector< E > & | elements, |  
          |  |  | size_t | max_elements |  
          |  | ) |  |  |  | inline | 
 
Note that elements will be pushed_back to vector. 
- Parameters
- 
  
    | maxElements | upper limit to be filled to vector. |  | elements | vector that elements will be drained to. |  
 
- Returns
- number of elements drained. 
Definition at line 172 of file iqueue.h.
  175         return to_object_drain(proxy::IQueueImpl::drain_to_data(max_elements),
 
 
 
 
◆ offer() [1/2]
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::offer | ( | const E & | element | ) |  |  | inline | 
 
Inserts the specified element into this queue. 
- Parameters
- 
  
  
- Returns
- trueif the element was added to this queue, else- false
Definition at line 76 of file iqueue.h.
   78         return offer(element, std::chrono::milliseconds(0));
 
boost::future< bool > offer(const E &element)
Inserts the specified element into this queue.
 
 
 
◆ offer() [2/2]
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::offer | ( | const E & | element, |  
          |  |  | std::chrono::milliseconds | timeout |  
          |  | ) |  |  |  | inline | 
 
Inserts the specified element into this queue. 
If queue is full waits for space to became available for specified time.
- Parameters
- 
  
    | element | to add |  | timeout | how long to wait before giving up |  
 
- Returns
- trueif successful, or- falseif the specified waiting time elapses before space is available
Definition at line 101 of file iqueue.h.
  104         return proxy::IQueueImpl::offer(to_data(element), timeout);
 
 
 
 
◆ peek()
template<typename E > 
  
  | 
        
          | boost::future<boost::optional<E> > hazelcast::client::iqueue::peek | ( |  | ) |  |  | inline | 
 
Returns immediately without waiting. 
- Returns
- head of queue without removing it. If not available returns empty constructed shared_ptr. 
Definition at line 198 of file iqueue.h.
  200         return to_object<E>(proxy::IQueueImpl::peek_data());
 
 
 
 
◆ poll() [1/2]
template<typename E > 
  
  | 
        
          | boost::future<boost::optional<E> > hazelcast::client::iqueue::poll | ( |  | ) |  |  | inline | 
 
Returns immediately without waiting. 
- Returns
- removes head of the queue and returns it to user . If not available returns empty constructed shared_ptr. 
Definition at line 186 of file iqueue.h.
  188         return poll<E>(std::chrono::milliseconds(0));
 
 
 
 
◆ poll() [2/2]
template<typename E > 
  
  | 
        
          | boost::future<boost::optional<E> > hazelcast::client::iqueue::poll | ( | std::chrono::milliseconds | timeout | ) |  |  | inline | 
 
- Parameters
- 
  
    | timeout | time to wait if item is not available. |  
 
- Returns
- the head of the queue. If queue is empty waits for specified time. 
Definition at line 125 of file iqueue.h.
  127         return to_object<E>(proxy::IQueueImpl::poll_data(timeout));
 
 
 
 
◆ put()
template<typename E > 
  
  | 
        
          | boost::future<void> hazelcast::client::iqueue::put | ( | const E & | element | ) |  |  | inline | 
 
Puts the element into queue. 
If queue is full waits for space to became available. 
Definition at line 86 of file iqueue.h.
   88         return proxy::IQueueImpl::put(to_data(element));
 
 
 
 
◆ remove()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::remove | ( | const E & | element | ) |  |  | inline | 
 
- Parameters
- 
  
  
- Returns
- true if element removed successfully. 
Definition at line 136 of file iqueue.h.
  138         return proxy::IQueueImpl::remove(to_data(element));
 
 
 
 
◆ remove_all()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::remove_all | ( | const std::vector< E > & | elements | ) |  |  | inline | 
 
- Parameters
- 
  
  
- Returns
- true if all elements are removed successfully. 
Definition at line 242 of file iqueue.h.
  244         return proxy::IQueueImpl::remove_all_data(to_data_collection(elements));
 
 
 
 
◆ retain_all()
template<typename E > 
  
  | 
        
          | boost::future<bool> hazelcast::client::iqueue::retain_all | ( | const std::vector< E > & | elements | ) |  |  | inline | 
 
Removes the elements from this queue that are not available in given "elements" vector. 
- Parameters
- 
  
  
- Returns
- true if operation is successful. 
Definition at line 255 of file iqueue.h.
  257         return proxy::IQueueImpl::retain_all_data(to_data_collection(elements));
 
 
 
 
◆ take()
template<typename E > 
  
  | 
        
          | boost::future<boost::optional<E> > hazelcast::client::iqueue::take | ( |  | ) |  |  | inline | 
 
- Returns
- the head of the queue. If queue is empty waits for an item to be added. 
Definition at line 113 of file iqueue.h.
  115         return to_object<E>(proxy::IQueueImpl::take_data());
 
 
 
 
◆ to_array()
template<typename E > 
  
  | 
        
          | boost::future<std::vector<E> > hazelcast::client::iqueue::to_array | ( |  | ) |  |  | inline | 
 
- Returns
- all elements as std::vector 
Definition at line 208 of file iqueue.h.
  210         return to_object_vector<E>(proxy::IQueueImpl::to_array_data());
 
 
 
 
The documentation for this class was generated from the following file:
- hazelcast/include/hazelcast/client/iqueue.h