Concurrent, distributed , client implementation of std::list.
More...
#include <IList.h>
|
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 ®istrationId) |
| 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 | addAll (int index, const std::vector< E > &elements) |
| Adds elements in vector to the list with given order. More...
|
|
bool | removeAll (const std::vector< E > &elements) |
|
bool | retainAll (const std::vector< E > &elements) |
| Removes the elements from this list that are not available in given "elements" vector. More...
|
|
void | clear () |
| Removes all elements from list.
|
|
boost::shared_ptr< E > | get (int index) |
| You can check if element is available by. More...
|
|
boost::shared_ptr< E > | set (int index, const E &element) |
| Replaced the element in the given index. More...
|
|
void | add (int index, const E &element) |
| Adds the element to the given index. More...
|
|
boost::shared_ptr< E > | remove (int index) |
|
int | indexOf (const E &element) |
|
int | lastIndexOf (const E &element) |
|
std::vector< E > | subList (int fromIndex, int toIndex) |
|
template<typename E>
class hazelcast::client::IList< E >
Concurrent, distributed , client implementation of std::list.
- Parameters
-
- Parameters
-
- Returns
- true if element is added successfully.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
Adds the element to the given index.
Shifts others to the right.
- Parameters
-
index | insert position |
element | to be inserted. |
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
IndexOutOfBoundsException | if the index is out of range. |
- Parameters
-
- Returns
- true if all elements given in vector can be added to list.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
Adds elements in vector to the list with given order.
Starts adding elements from given index, and shifts others to the right.
- Parameters
-
index | start point of insterting given elements |
elements | vector of elements that will be added to list |
- Returns
- true if list elements are added.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
IndexOutOfBoundsException | if the index is out of range. |
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 | that will be added |
includeValue | bool value representing value should be included in ItemEvent or not. |
- Returns
- registrationId that can be used to remove item listener
- Parameters
-
- Returns
- true if list contains element
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
- Parameters
-
- Returns
- true if this list contains all elements given in vector.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
You can check if element is available by.
boost::shared_ptr<int> e = list.get(5); if(e.get() != NULL ) //......;
- Parameters
-
- Returns
- element in given index. If not available returns empty constructed shared_ptr.
- Exceptions
-
IndexOutOfBoundsException | if the index is out of range. |
- Parameters
-
element | that will be searched |
- Returns
- index of first occurrence of given element in the list. Returns -1 if element is not in the list.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
- Parameters
-
element | that will be searched |
- Returns
- index of last occurrence of given element in the list. Returns -1 if element is not in the list.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
- Parameters
-
- Returns
- true if element is removed successfully.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
- Parameters
-
- Returns
- element in given index. If not available returns empty constructed shared_ptr.
- See Also
- get
- Exceptions
-
IndexOutOfBoundsException | if the index is out of range. |
- 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 false 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 list 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. |
Replaced the element in the given index.
And returns element if there were entry before inserting.
- Parameters
-
index | insert position |
element | to be inserted. |
- Returns
- oldElement in given index.
- Exceptions
-
IClassCastException | if the type of the specified element is incompatible with the server side. |
IndexOutOfBoundsException | if the index is out of range. |
- Returns
- size of the distributed list
- Returns
- the sublist as vector between given indexes.
- Exceptions
-
IndexOutOfBoundsException | if the index is out of range. |
- Returns
- all elements as std::vector
The documentation for this class was generated from the following file:
- hazelcast/include/hazelcast/client/IList.h