Concurrent, blocking, distributed, observable, client queue.
More...
#include <IQueue.h>
|
std::string | addItemListener (ItemListener< E > &listener, bool includeValue) |
| Adds an item listener for this collection. More...
|
|
bool | removeItemListener (const std::string ®istrationId) |
| Removes the specified item listener. More...
|
|
bool | offer (const E &element) |
| Inserts the specified element into this queue. More...
|
|
void | put (const E &element) |
| Puts the element into queue. More...
|
|
bool | offer (const E &element, long timeoutInMillis) |
| Inserts the specified element into this queue. More...
|
|
boost::shared_ptr< E > | take () |
|
boost::shared_ptr< E > | poll (long timeoutInMillis) |
|
int | remainingCapacity () |
|
bool | remove (const E &element) |
|
bool | contains (const E &element) |
|
size_t | drainTo (std::vector< E > &elements) |
| Note that elements will be pushed_back to vector. More...
|
|
size_t | drainTo (std::vector< E > &elements, size_t maxElements) |
| Note that elements will be pushed_back to vector. More...
|
|
boost::shared_ptr< E > | poll () |
| Returns immediately without waiting. More...
|
|
boost::shared_ptr< E > | peek () |
| Returns immediately without waiting. More...
|
|
int | size () |
|
bool | isEmpty () |
|
std::vector< E > | toArray () |
|
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 queue that are not available in given "elements" vector. More...
|
|
void | clear () |
| Removes all elements from queue.
|
|
|
class | HazelcastClient |
|
class | adaptor::RawPointerQueue< E > |
|
template<typename E>
class hazelcast::client::IQueue< E >
Concurrent, blocking, distributed, observable, client queue.
- Template Parameters
-
- Parameters
-
- Returns
- true if all elements given in vector can be added to queue.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
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 | true updated item should be passed to the item listener, false otherwise. |
- Returns
- returns registration id.
- Parameters
-
- Returns
- true if queue contains the element.
- Parameters
-
- Returns
- true if this queue contains all elements given in vector.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
Note that elements will be pushed_back to vector.
- Parameters
-
elements | the vector that elements will be drained to. |
- Returns
- number of elements drained.
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.
- Returns
- true if queue is empty
Inserts the specified element into this queue.
- Parameters
-
- Returns
true
if the element was added to this queue, else false
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
Inserts the specified element into this queue.
If queue is full waits for space to became available for specified time.
- Parameters
-
element | to add |
timeoutInMillis | how long to wait before giving up, in units of |
- Returns
true
if successful, or false
if the specified waiting time elapses before space is available
Returns immediately without waiting.
- Returns
- head of queue without removing it. If not available returns empty constructed shared_ptr.
- Parameters
-
timeoutInMillis | time to wait if item is not available. |
- Returns
- the head of the queue. If queue is empty waits for specified time.
Returns immediately without waiting.
- Returns
- removes head of the queue and returns it to user . If not available returns empty constructed shared_ptr.
Puts the element into queue.
If queue is full waits for space to became available.
- Returns
- remaining capacity
- Parameters
-
- Returns
- true if element removed successfully.
- Parameters
-
- Returns
- true if all elements are removed successfully.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
Removes the specified item listener.
Returns silently if the specified listener is not added before.
- Parameters
-
registrationId | Id of listener registration. |
- Returns
- true if registration is removed, false otherwise
Removes the elements from this queue that are not available in given "elements" vector.
- Parameters
-
- Returns
- true if operation is successful.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
- Returns
- size of this distributed queue
- Returns
- the head of the queue. If queue is empty waits for an item to be added.
- Returns
- all elements as std::vector
The documentation for this class was generated from the following file:
- hazelcast/include/hazelcast/client/IQueue.h