|
|
|
@ -21,16 +21,70 @@ import io.netty.util.concurrent.Future;
|
|
|
|
|
|
|
|
|
|
public interface RCollectionAsync<V> extends RExpirableAsync {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Retains only the elements in this collection that are contained in the
|
|
|
|
|
* specified collection (optional operation). In other words, removes from
|
|
|
|
|
* this collection all of its elements that are not contained in the
|
|
|
|
|
* specified collection.
|
|
|
|
|
*
|
|
|
|
|
* @param c collection containing elements to be retained in this collection
|
|
|
|
|
* @return <tt>true</tt> if this collection changed as a result of the call
|
|
|
|
|
*/
|
|
|
|
|
Future<Boolean> retainAllAsync(Collection<?> c);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Removes all of this collection's elements that are also contained in the
|
|
|
|
|
* specified collection (optional operation). After this call returns,
|
|
|
|
|
* this collection will contain no elements in common with the specified
|
|
|
|
|
* collection.
|
|
|
|
|
*
|
|
|
|
|
* @param c collection containing elements to be removed from this collection
|
|
|
|
|
* @return <tt>true</tt> if this collection changed as a result of the
|
|
|
|
|
* call
|
|
|
|
|
*/
|
|
|
|
|
Future<Boolean> removeAllAsync(Collection<?> c);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns <tt>true</tt> if this collection contains the specified element.
|
|
|
|
|
* More formally, returns <tt>true</tt> if and only if this collection
|
|
|
|
|
* contains at least one element <tt>e</tt> such that
|
|
|
|
|
* <tt>(o==null ? e==null : o.equals(e))</tt>.
|
|
|
|
|
*
|
|
|
|
|
* @param o element whose presence in this collection is to be tested
|
|
|
|
|
* @return <tt>true</tt> if this collection contains the specified
|
|
|
|
|
* element
|
|
|
|
|
*/
|
|
|
|
|
Future<Boolean> containsAsync(Object o);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns <tt>true</tt> if this collection contains all of the elements
|
|
|
|
|
* in the specified collection.
|
|
|
|
|
*
|
|
|
|
|
* @param c collection to be checked for containment in this collection
|
|
|
|
|
* @return <tt>true</tt> if this collection contains all of the elements
|
|
|
|
|
* in the specified collection
|
|
|
|
|
*/
|
|
|
|
|
Future<Boolean> containsAllAsync(Collection<?> c);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Removes a single instance of the specified element from this
|
|
|
|
|
* collection, if it is present (optional operation). More formally,
|
|
|
|
|
* removes an element <tt>e</tt> such that
|
|
|
|
|
* <tt>(o==null ? e==null : o.equals(e))</tt>, if
|
|
|
|
|
* this collection contains one or more such elements. Returns
|
|
|
|
|
* <tt>true</tt> if this collection contained the specified element (or
|
|
|
|
|
* equivalently, if this collection changed as a result of the call).
|
|
|
|
|
*
|
|
|
|
|
* @param o element to be removed from this collection, if present
|
|
|
|
|
* @return <tt>true</tt> if an element was removed as a result of this call
|
|
|
|
|
*/
|
|
|
|
|
Future<Boolean> removeAsync(Object o);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the number of elements in this collection.
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
Future<Integer> sizeAsync();
|
|
|
|
|
|
|
|
|
|
Future<Boolean> addAsync(V e);
|
|
|
|
|