public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E>
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
add(int index,
E element)
Inserts the specified element at the specified position in this list
(optional operation).
|
CompletableFuture<Boolean> |
addAll(int index,
Collection<? extends E> c)
Inserts all of the elements in the specified collection into this
list at the specified position (optional operation).
|
CompletableFuture<E> |
get(int index)
Returns the element at the specified position in this list.
|
CompletableFuture<Integer> |
indexOf(Object o)
Returns the index of the first occurrence of the specified element
in this list, or -1 if this list does not contain the element.
|
CompletableFuture<Integer> |
lastIndexOf(Object o)
Returns the index of the last occurrence of the specified element
in this list, or -1 if this list does not contain the element.
|
CompletableFuture<E> |
remove(int index)
Removes the element at the specified position in this list (optional
operation).
|
CompletableFuture<E> |
set(int index,
E element)
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
default DistributedList<E> |
sync()
Returns a synchronous wrapper around the asynchronous primitive.
|
DistributedList<E> |
sync(Duration operationTimeout)
Returns a synchronous wrapper around the asynchronous primitive.
|
add, addAll, addListener, addListener, clear, contains, containsAll, isEmpty, remove, removeAll, removeListener, retainAll, sizeclose, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeiterator, streamCompletableFuture<Boolean> addAll(int index, Collection<? extends E> c)
index - index at which to insert the first element from the
specified collectionc - collection containing elements to be added to this listUnsupportedOperationException - if the addAll operation
is not supported by this listClassCastException - if the class of an element of the specified
collection prevents it from being added to this listNullPointerException - if the specified collection contains one
or more null elements and this list does not permit null
elements, or if the specified collection is nullIllegalArgumentException - if some property of an element of the
specified collection prevents it from being added to this listIndexOutOfBoundsException - if the index is out of range
(index < 0 || index > size())CompletableFuture<E> get(int index)
index - index of the element to returnIndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())CompletableFuture<E> set(int index, E element)
index - index of the element to replaceelement - element to be stored at the specified positionUnsupportedOperationException - if the set operation
is not supported by this listClassCastException - if the class of the specified element
prevents it from being added to this listNullPointerException - if the specified element is null and
this list does not permit null elementsIllegalArgumentException - if some property of the specified
element prevents it from being added to this listIndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())CompletableFuture<Void> add(int index, E element)
index - index at which the specified element is to be insertedelement - element to be insertedUnsupportedOperationException - if the add operation
is not supported by this listClassCastException - if the class of the specified element
prevents it from being added to this listNullPointerException - if the specified element is null and
this list does not permit null elementsIllegalArgumentException - if some property of the specified
element prevents it from being added to this listIndexOutOfBoundsException - if the index is out of range
(index < 0 || index > size())CompletableFuture<E> remove(int index)
index - the index of the element to be removedUnsupportedOperationException - if the remove operation
is not supported by this listIndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())CompletableFuture<Integer> indexOf(Object o)
o - element to search forClassCastException - if the type of the specified element
is incompatible with this list
(optional)NullPointerException - if the specified element is null and this
list does not permit null elements
(optional)CompletableFuture<Integer> lastIndexOf(Object o)
o - element to search forClassCastException - if the type of the specified element
is incompatible with this list
(optional)NullPointerException - if the specified element is null and this
list does not permit null elements
(optional)default DistributedList<E> sync()
AsyncPrimitivesync in interface AsyncDistributedCollection<E>sync in interface AsyncPrimitiveDistributedList<E> sync(Duration operationTimeout)
AsyncPrimitivesync in interface AsyncDistributedCollection<E>sync in interface AsyncPrimitiveoperationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.