diff --git a/src/main/java/org/redisson/core/RCollectionAsync.java b/src/main/java/org/redisson/core/RCollectionAsync.java index 239f8dbae..61cfc790e 100644 --- a/src/main/java/org/redisson/core/RCollectionAsync.java +++ b/src/main/java/org/redisson/core/RCollectionAsync.java @@ -21,16 +21,70 @@ import io.netty.util.concurrent.Future; public interface RCollectionAsync 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 true if this collection changed as a result of the call + */ Future 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 true if this collection changed as a result of the + * call + */ Future removeAllAsync(Collection c); + /** + * Returns true if this collection contains the specified element. + * More formally, returns true if and only if this collection + * contains at least one element e such that + * (o==null ? e==null : o.equals(e)). + * + * @param o element whose presence in this collection is to be tested + * @return true if this collection contains the specified + * element + */ Future containsAsync(Object o); + /** + * Returns true if this collection contains all of the elements + * in the specified collection. + * + * @param c collection to be checked for containment in this collection + * @return true if this collection contains all of the elements + * in the specified collection + */ Future 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 e such that + * (o==null ? e==null : o.equals(e)), if + * this collection contains one or more such elements. Returns + * true 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 true if an element was removed as a result of this call + */ Future removeAsync(Object o); + /** + * Returns the number of elements in this collection. + * + * @return + */ Future sizeAsync(); Future addAsync(V e); diff --git a/src/main/java/org/redisson/core/RLock.java b/src/main/java/org/redisson/core/RLock.java index 9126730c3..174c941de 100644 --- a/src/main/java/org/redisson/core/RLock.java +++ b/src/main/java/org/redisson/core/RLock.java @@ -122,7 +122,7 @@ public interface RLock extends Lock, RExpirable { Future lockAsync(long leaseTime, TimeUnit unit); - Future tryLockAsync(long time, TimeUnit unit); + Future tryLockAsync(long waitTime, TimeUnit unit); Future tryLockAsync(final long waitTime, final long leaseTime, final TimeUnit unit); diff --git a/src/main/java/org/redisson/core/RMapAsync.java b/src/main/java/org/redisson/core/RMapAsync.java index 36abdd095..7d4461b1b 100644 --- a/src/main/java/org/redisson/core/RMapAsync.java +++ b/src/main/java/org/redisson/core/RMapAsync.java @@ -45,7 +45,7 @@ public interface RMapAsync extends RExpirableAsync { /** * Removes keys from map by one operation in async manner * - * Works faster than RMap.removeAsync but not returning + * Works faster than RMap.removeAsync but doesn't return * the value associated with key * * @param keys