javadoc parser compatibility fixed

pull/614/head
Nikita 9 years ago
parent 702a38d968
commit c1326cc5b7

@ -32,7 +32,7 @@ import org.redisson.pubsub.LockPubSub;
* Distributed implementation of {@link java.util.concurrent.locks.Lock}
* Implements reentrant lock.<br>
* Lock will be removed automatically if client disconnects.
* <p/>
* <p>
* Implements a <b>fair</b> locking so it guarantees an acquire order by threads.
*
* @author Nikita Koksharov

@ -46,7 +46,7 @@ import io.netty.util.internal.PlatformDependent;
* Distributed implementation of {@link java.util.concurrent.locks.Lock}
* Implements reentrant lock.<br>
* Lock will be removed automatically if client disconnects.
* <p/>
* <p>
* Implements a <b>non-fair</b> locking so doesn't guarantees an acquire order.
*
* @author Nikita Koksharov

@ -38,7 +38,7 @@ import io.netty.util.concurrent.FutureListener;
/**
* Distributed and concurrent implementation of {@link java.util.concurrent.Semaphore}.
* <p/>
* <p>
* Works in non-fair mode. Therefore order of acquiring is unpredictable.
*
* @author Nikita Koksharov

@ -46,7 +46,7 @@ public class LocalCachedMapOptions {
/**
* Creates a new instance of LocalCachedMapOptions with default options.
* <p/>
* <p>
* This is equivalent to:
* <pre>
* new LocalCachedMapOptions()
@ -54,6 +54,9 @@ public class LocalCachedMapOptions {
* .evictionPolicy(EvictionPolicy.NONE)
* .invalidateEntryOnChange(true);
* </pre>
*
* @return LocalCachedMapOptions instance
*
*/
public static LocalCachedMapOptions defaults() {
return new LocalCachedMapOptions()
@ -85,8 +88,8 @@ public class LocalCachedMapOptions {
/**
* Sets cache size. If size is <code>0</code> then cache is unbounded.
*
* @param cacheSize
* @return
* @param cacheSize - size of cache
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions cacheSize(int cacheSize) {
this.cacheSize = cacheSize;
@ -99,7 +102,7 @@ public class LocalCachedMapOptions {
* @param value - if <code>true</code> then invalidation message which removes corresponding entry from cache
* will be sent to all other RLocalCachedMap instances on each entry update/remove operation.
* if <code>false</code> then invalidation message won't be sent
* @return
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions invalidateEntryOnChange(boolean value) {
this.invalidateEntryOnChange = value;
@ -113,7 +116,7 @@ public class LocalCachedMapOptions {
* <p><code>LRU</code> - uses cache with LRU (least recently used) eviction policy.
* <p><code>LFU</code> - uses cache with LFU (least frequently used) eviction policy.
* <p><code>NONE</code> - doesn't use eviction policy, but timeToLive and maxIdleTime params are still working.
* @return
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions evictionPolicy(EvictionPolicy evictionPolicy) {
if (evictionPolicy == null) {
@ -125,10 +128,10 @@ public class LocalCachedMapOptions {
/**
* Sets time to live in milliseconds for each map entry in cache.
* If value equals to <code>0<code> then timeout is not applied
* If value equals to <code>0</code> then timeout is not applied
*
* @param timeToLiveInMillis
* @return
* @param timeToLiveInMillis - time to live in milliseconds
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions timeToLive(long timeToLiveInMillis) {
this.timeToLiveInMillis = timeToLiveInMillis;
@ -137,11 +140,11 @@ public class LocalCachedMapOptions {
/**
* Sets time to live for each map entry in cache.
* If value equals to <code>0<code> then timeout is not applied
* If value equals to <code>0</code> then timeout is not applied
*
* @param timeToLive
* @param timeUnit
* @return
* @param timeToLive - time to live
* @param timeUnit - time unit
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions timeToLive(long timeToLive, TimeUnit timeUnit) {
return timeToLive(timeUnit.toMillis(timeToLive));
@ -149,10 +152,10 @@ public class LocalCachedMapOptions {
/**
* Sets max idle time in milliseconds for each map entry in cache.
* If value equals to <code>0<code> then timeout is not applied
* If value equals to <code>0</code> then timeout is not applied
*
* @param maxIdleInMillis
* @return
* @param maxIdleInMillis - time to live in milliseconds
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions maxIdle(long maxIdleInMillis) {
this.maxIdleInMillis = maxIdleInMillis;
@ -161,10 +164,11 @@ public class LocalCachedMapOptions {
/**
* Sets max idle time for each map entry in cache.
* If value equals to <code>0<code> then timeout is not applied
* If value equals to <code>0</code> then timeout is not applied
*
* @param maxIdleInMillis
* @return
* @param maxIdle - max idle time
* @param timeUnit - time unit
* @return LocalCachedMapOptions instance
*/
public LocalCachedMapOptions maxIdle(long maxIdle, TimeUnit timeUnit) {
return timeToLive(timeUnit.toMillis(maxIdle));

@ -28,16 +28,14 @@ public interface Node {
/**
* Returns node type
*
* @see {@link NodeType}
*
* @return
* @return node type
*/
NodeType getType();
/**
* Get Redis node address
*
* @return
* @return node address
*/
InetSocketAddress getAddr();

@ -30,24 +30,23 @@ public interface NodesGroup<N extends Node> {
* Adds connection listener which will be triggered
* when Redisson has just been connected to or disconnected from redis server
*
* @param connectionListener
* @param connectionListener - connection listener
* @return id of listener
*/
int addConnectionListener(ConnectionListener connectionListener);
/**
* Removes connection listener by id
*
* @param listenerId
* @param listenerId - id of connection listener
*/
void removeConnectionListener(int listenerId);
/**
* Get all nodes by type
*
* @see {@link NodeType}
*
* @param type
* @return
* @param type - type of node
* @return collection of nodes
*/
Collection<N> getNodes(NodeType type);
@ -55,7 +54,7 @@ public interface NodesGroup<N extends Node> {
* All Redis nodes used by Redisson.
* This collection may change during master change, cluster topology update and etc.
*
* @return
* @return collection of nodes
*/
Collection<N> getNodes();

@ -22,11 +22,11 @@ import org.redisson.client.codec.Codec;
/**
* Interface for using pipeline feature.
* <p/>
* <p>
* All method invocations on objects
* from this interface are batched to separate queue and could be executed later
* with <code>execute()</code> or <code>executeAsync()</code> methods.
* <p/>
* <p>
* Please be ware, atomicity <b>is not</b> guaranteed.
*
*
@ -38,8 +38,9 @@ public interface RBatch {
/**
* Returns geospatial items holder instance by <code>name</code>.
*
* @param name
* @return
* @param <V> type of object
* @param name - name of object
* @return Geo object
*/
<V> RGeoAsync<V> getGeo(String name);
@ -47,27 +48,32 @@ public interface RBatch {
* Returns geospatial items holder instance by <code>name</code>
* using provided codec for geospatial members.
*
* @param name
* @param geospatial member codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for value
* @return Geo object
*/
<V> RGeoAsync<V> getGeo(String name, Codec codec);
/**
* Returns Set based MultiMap instance by name.
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return Multimap object
*/
<K, V> RMultimapAsync<K, V> getSetMultimap(String name);
/**
* Returns Set based MultiMap instance by name
* using provided codec for both map keys and values.
*
* @param name
* @param codec
* @return
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - provided codec
* @return Multimap object
*/
<K, V> RMultimapAsync<K, V> getSetMultimap(String name, Codec codec);
@ -77,8 +83,10 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return SetMultimapCache object
*/
<K, V> RMultimapCacheAsync<K, V> getSetMultimapCache(String name);
@ -89,8 +97,11 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String, Codec)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - provided codec
* @return SetMultimapCache object
*/
<K, V> RMultimapCacheAsync<K, V> getSetMultimapCache(String name, Codec codec);
@ -101,9 +112,9 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of value
* @param name - name of object
* @return SetCache object
*/
<V> RSetCacheAsync<V> getSetCache(String name);
@ -115,9 +126,10 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return SetCache object
*/
<V> RSetCacheAsync<V> getSetCache(String name, Codec codec);
@ -128,9 +140,11 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return MapCache object
*/
<K, V> RMapCacheAsync<K, V> getMapCache(String name, Codec codec);
@ -140,16 +154,19 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return MapCache object
*/
<K, V> RMapCacheAsync<K, V> getMapCache(String name);
/**
* Returns object holder by <code>name</code>
*
* @param name of object
* @return
* @param <V> type of object
* @param name - name of object
* @return Bucket object
*/
<V> RBucketAsync<V> getBucket(String name);
@ -158,8 +175,9 @@ public interface RBatch {
/**
* Returns HyperLogLog object
*
* @param name of object
* @return
* @param <V> type of object
* @param name - name of object
* @return HyperLogLog object
*/
<V> RHyperLogLogAsync<V> getHyperLogLog(String name);
@ -168,8 +186,9 @@ public interface RBatch {
/**
* Returns list instance by name.
*
* @param name of list
* @return
* @param <V> type of object
* @param name - name of object
* @return List object
*/
<V> RListAsync<V> getList(String name);
@ -178,8 +197,10 @@ public interface RBatch {
/**
* Returns List based MultiMap instance by name.
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return ListMultimap object
*/
<K, V> RMultimapAsync<K, V> getListMultimap(String name);
@ -187,9 +208,11 @@ public interface RBatch {
* Returns List based MultiMap instance by name
* using provided codec for both map keys and values.
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return ListMultimap object
*/
<K, V> RMultimapAsync<K, V> getListMultimap(String name, Codec codec);
@ -199,8 +222,10 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return ListMultimapCache object
*/
<K, V> RMultimapAsync<K, V> getListMultimapCache(String name);
@ -211,16 +236,21 @@ public interface RBatch {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String, Codec)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return ListMultimapCache object
*/
<K, V> RMultimapAsync<K, V> getListMultimapCache(String name, Codec codec);
/**
* Returns map instance by name.
*
* @param name of map
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return Map object
*/
<K, V> RMapAsync<K, V> getMap(String name);
@ -229,8 +259,9 @@ public interface RBatch {
/**
* Returns set instance by name.
*
* @param name of set
* @return
* @param <V> type of value
* @param name - name of object
* @return Set object
*/
<V> RSetAsync<V> getSet(String name);
@ -239,8 +270,9 @@ public interface RBatch {
/**
* Returns topic instance by name.
*
* @param name of topic
* @return
* @param <M> type of message
* @param name - name of object
* @return Topic object
*/
<M> RTopicAsync<M> getTopic(String name);
@ -249,8 +281,9 @@ public interface RBatch {
/**
* Returns queue instance by name.
*
* @param name of queue
* @return
* @param <V> type of value
* @param name - name of object
* @return Queue object
*/
<V> RQueueAsync<V> getQueue(String name);
@ -259,8 +292,9 @@ public interface RBatch {
/**
* Returns blocking queue instance by name.
*
* @param name of queue
* @return
* @param <V> type of value
* @param name - name of object
* @return BlockingQueue object
*/
<V> RBlockingQueueAsync<V> getBlockingQueue(String name);
@ -269,8 +303,9 @@ public interface RBatch {
/**
* Returns deque instance by name.
*
* @param name of deque
* @return
* @param <V> type of value
* @param name - name of object
* @return Deque object
*/
<V> RDequeAsync<V> getDeque(String name);
@ -278,9 +313,10 @@ public interface RBatch {
/**
* Returns blocking deque instance by name.
*
* @param name of queue
* @return
*
* @param <V> type of value
* @param name - name of object
* @return BlockingDeque object
*/
<V> RBlockingDequeAsync<V> getBlockingDeque(String name);
@ -289,24 +325,25 @@ public interface RBatch {
/**
* Returns atomicLong instance by name.
*
* @param name
* @return
* @param name - name of object
* @return AtomicLong object
*/
RAtomicLongAsync getAtomicLong(String name);
/**
* Returns atomicDouble instance by name.
*
* @param name
* @return
* @param name - name of object
* @return AtomicDouble object
*/
RAtomicDoubleAsync getAtomicDouble(String name);
/**
* Returns Redis Sorted Set instance by name
*
* @param name
* @return
*
* @param <V> type of value
* @param name - name of object
* @return ScoredSortedSet object
*/
<V> RScoredSortedSetAsync<V> getScoredSortedSet(String name);
@ -317,8 +354,8 @@ public interface RBatch {
* All elements are inserted with the same score during addition,
* in order to force lexicographical ordering
*
* @param name
* @return
* @param name - name of object
* @return LexSortedSet object
*/
RLexSortedSetAsync getLexSortedSet(String name);
@ -327,7 +364,7 @@ public interface RBatch {
/**
* Returns script operations object
*
* @return
* @return Script object
*/
RScriptAsync getScript();
@ -335,7 +372,7 @@ public interface RBatch {
* Returns keys operations.
* Each of Redis/Redisson object associated with own key
*
* @return
* @return Keys object
*/
RKeysAsync getKeys();

@ -40,9 +40,9 @@ public interface RBatchReactive {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of value
* @param name - name of object
* @return SetCache object
*/
<V> RSetCacheReactive<V> getSetCache(String name);
@ -54,9 +54,10 @@ public interface RBatchReactive {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return SetCache object
*/
<V> RSetCacheReactive<V> getSetCache(String name, Codec codec);
@ -67,9 +68,11 @@ public interface RBatchReactive {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return MapCache object
*/
<K, V> RMapCacheReactive<K, V> getMapCache(String name, Codec codec);
@ -79,26 +82,30 @@ public interface RBatchReactive {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return MapCache object
*/
<K, V> RMapCacheReactive<K, V> getMapCache(String name);
/**
* Returns object holder by name
*
* @param name of object
* @return
* @param <V> type of value
* @param name - name of object
* @return Bucket object
*/
<V> RBucketReactive<V> getBucket(String name);
<V> RBucketReactive<V> getBucket(String name, Codec codec);
/**
* Returns HyperLogLog object
* Returns HyperLogLog object by name
*
* @param name of object
* @return
* @param <V> type of value
* @param name - name of object
* @return HyperLogLog object
*/
<V> RHyperLogLogReactive<V> getHyperLogLog(String name);
@ -107,8 +114,9 @@ public interface RBatchReactive {
/**
* Returns list instance by name.
*
* @param name of list
* @return
* @param <V> type of value
* @param name - name of object
* @return List object
*/
<V> RListReactive<V> getList(String name);
@ -117,8 +125,10 @@ public interface RBatchReactive {
/**
* Returns map instance by name.
*
* @param name of map
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return Map object
*/
<K, V> RMapReactive<K, V> getMap(String name);
@ -126,9 +136,10 @@ public interface RBatchReactive {
/**
* Returns set instance by name.
*
* @param name of set
* @return
*
* @param <V> type of value
* @param name - name of object
* @return Set object
*/
<V> RSetReactive<V> getSet(String name);
@ -137,8 +148,9 @@ public interface RBatchReactive {
/**
* Returns topic instance by name.
*
* @param name of topic
* @return
* @param <M> type of message
* @param name - name of object
* @return Topic object
*/
<M> RTopicReactive<M> getTopic(String name);
@ -147,8 +159,9 @@ public interface RBatchReactive {
/**
* Returns queue instance by name.
*
* @param name of queue
* @return
* @param <V> type of value
* @param name - name of object
* @return Queue object
*/
<V> RQueueReactive<V> getQueue(String name);
@ -156,9 +169,10 @@ public interface RBatchReactive {
/**
* Returns blocking queue instance by name.
*
* @param name of queue
* @return
*
* @param <V> type of value
* @param name - name of object
* @return BlockingQueue object
*/
<V> RBlockingQueueReactive<V> getBlockingQueue(String name);
@ -166,9 +180,10 @@ public interface RBatchReactive {
/**
* Returns deque instance by name.
*
* @param name of deque
* @return
*
* @param <V> type of value
* @param name - name of object
* @return Deque object
*/
<V> RDequeReactive<V> getDequeReactive(String name);
@ -176,17 +191,18 @@ public interface RBatchReactive {
/**
* Returns "atomic long" instance by name.
*
* @param name of the "atomic long"
* @return
*
* @param name - name of object
* @return AtomicLong object
*/
RAtomicLongReactive getAtomicLongReactive(String name);
/**
* Returns Redis Sorted Set instance by name
*
* @param name
* @return
*
* @param <V> type of value
* @param name - name of object
* @return ScoredSortedSet object
*/
<V> RScoredSortedSetReactive<V> getScoredSortedSet(String name);
@ -197,8 +213,8 @@ public interface RBatchReactive {
* All elements are inserted with the same score during addition,
* in order to force lexicographical ordering
*
* @param name
* @return
* @param name - name of object
* @return LexSortedSet object
*/
RLexSortedSetReactive getLexSortedSet(String name);
@ -206,14 +222,14 @@ public interface RBatchReactive {
* Returns bitSet instance by name.
*
* @param name of bitSet
* @return
* @return BitSet object
*/
RBitSetReactive getBitSet(String name);
/**
* Returns script operations object
*
* @return
* @return Script object
*/
RScriptReactive getScript();
@ -221,7 +237,7 @@ public interface RBatchReactive {
* Returns keys operations.
* Each of Redis/Redisson object associated with own key
*
* @return
* @return Keys object
*/
RKeysReactive getKeys();

@ -30,7 +30,8 @@ public interface RBlockingDeque<V> extends BlockingDeque<V>, RBlockingQueue<V>,
* Retrieves and removes first available head element of <b>any</b> queue,
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
@ -45,7 +46,8 @@ public interface RBlockingDeque<V> extends BlockingDeque<V>, RBlockingQueue<V>,
* Retrieves and removes first available tail element of <b>any</b> queue,
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the

@ -31,13 +31,13 @@ public interface RBlockingDequeAsync<V> extends RDequeAsync<V>, RBlockingQueueAs
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return the head of this queue, or {@code null} if the
* specified waiting time elapses before an element is available
* @throws InterruptedException if interrupted while waiting
*/
RFuture<V> pollFirstFromAnyAsync(long timeout, TimeUnit unit, String ... queueNames);
@ -45,14 +45,14 @@ public interface RBlockingDequeAsync<V> extends RDequeAsync<V>, RBlockingQueueAs
* Retrieves and removes first available tail element of <b>any</b> queue in async mode,
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return the head of this queue, or {@code null} if the
* specified waiting time elapses before an element is available
* @throws InterruptedException if interrupted while waiting
*/
RFuture<V> pollLastFromAnyAsync(long timeout, TimeUnit unit, String ... queueNames);

@ -31,6 +31,7 @@ public interface RBlockingQueue<V> extends BlockingQueue<V>, RQueue<V>, RBlockin
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the

@ -32,13 +32,13 @@ public interface RBlockingQueueAsync<V> extends RQueueAsync<V> {
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return Future object with the head of this queue, or {@code null} if the
* specified waiting time elapses before an element is available
* @throws InterruptedException if interrupted while waiting
*/
RFuture<V> pollFromAnyAsync(long timeout, TimeUnit unit, String ... queueNames);
@ -104,7 +104,6 @@ public interface RBlockingQueueAsync<V> extends RQueueAsync<V> {
* {@code timeout} parameter
* @return the head of this queue, or {@code null} if the
* specified waiting time elapses before an element is available
* @throws InterruptedException if interrupted while waiting
*/
RFuture<V> pollAsync(long timeout, TimeUnit unit);
@ -113,7 +112,6 @@ public interface RBlockingQueueAsync<V> extends RQueueAsync<V> {
* until an element becomes available.
*
* @return the head of this queue
* @throws InterruptedException if interrupted while waiting
*/
RFuture<V> takeAsync();
@ -122,12 +120,12 @@ public interface RBlockingQueueAsync<V> extends RQueueAsync<V> {
* for space to become available.
*
* @param e the element to add
* @throws InterruptedException if interrupted while waiting
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this queue
* @throws NullPointerException if the specified element is null
* @throws IllegalArgumentException if some property of the specified
* element prevents it from being added to this queue
* @return void
*/
RFuture<Void> putAsync(V e);

@ -34,13 +34,13 @@ public interface RBlockingQueueReactive<V> extends RQueueReactive<V> {
* waiting up to the specified wait time if necessary for an element to become available
* in any of defined queues <b>including</b> queue own.
*
* @param queueNames - names of queue
* @param timeout how long to wait before giving up, in units of
* {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return Publisher object with the head of this queue, or {@code null} if the
* specified waiting time elapses before an element is available
* @throws InterruptedException if interrupted while waiting
*/
Publisher<V> pollFromAny(long timeout, TimeUnit unit, String ... queueNames);

@ -22,7 +22,7 @@ package org.redisson.api;
*
* @author Nikita Koksharov
*
* @param <T>
* @param <T> - type of object
*/
public interface RBloomFilter<T> extends RExpirable {
@ -35,8 +35,8 @@ public interface RBloomFilter<T> extends RExpirable {
* calculated from <code>expectedInsertions</code> and <code>falseProbability</code>
* Stores config to Redis server.
*
* @param expectedInsertions
* @param falseProbability
* @param expectedInsertions - expected amount of insertions
* @param falseProbability - expected false probability
* @return <code>true</code> if Bloom filter initialized
* <code>false</code> if Bloom filter already has been initialized
*/
@ -53,7 +53,7 @@ public interface RBloomFilter<T> extends RExpirable {
/**
* Calculates probabilistic number of elements already added to Bloom filter.
*
* @return
* @return probabilistic number of elements
*/
int count();

@ -46,7 +46,6 @@ public interface RBoundedBlockingQueueAsync<V> extends RBlockingQueueAsync<V> {
* {@code timeout} parameter
* @return {@code true} if successful, or {@code false} if
* the specified waiting time elapses before space is available
* @throws InterruptedException if interrupted while waiting
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this queue
* @throws NullPointerException if the specified element is null

@ -30,18 +30,20 @@ public interface RBuckets {
* h[^e]llo matches hallo, hbllo, ... but not hello
* h[a-b]llo matches hallo and hbllo</pre>
* <p>Use \ to escape special characters if you want to match them verbatim.
*
* @param pattern
* @return
*
* @param <V> type of value
* @param pattern - pattern of key
* @return List of bucket objects
*/
<V> List<RBucket<V>> find(String pattern);
/**
* Returns Redis object mapped by key. Result Map is not contains
* key-value entry for null values.
*
* @param keys
* @return
*
* @param <V> type of value
* @param keys - keys
* @return Map with name of bucket as key and bucket as value
*/
<V> Map<String, V> get(String ... keys);
@ -50,14 +52,15 @@ public interface RBuckets {
* If at least one of them is already exist then
* don't set none of them.
*
* @param buckets
* @param buckets - map of buckets
* @return <code>true</code> if object has been set overwise <code>false</code>
*/
boolean trySet(Map<String, ?> buckets);
/**
* Saves objects mapped by Redis key.
*
* @param buckets
* @param buckets - map of buckets
*/
void set(Map<String, ?> buckets);

@ -81,7 +81,7 @@ public interface RCollectionAsync<V> extends RExpirableAsync {
/**
* Returns the number of elements in this collection.
*
* @return
* @return size of collection
*/
RFuture<Integer> sizeAsync();

@ -19,7 +19,7 @@ package org.redisson.api;
* Distributed alternative to the {@link java.util.concurrent.CountDownLatch}
*
* It has an advantage over {@link java.util.concurrent.CountDownLatch} --
* count can be set via {@link #trySetCount} method.
* count can be set via {@link #trySetCountAsync} method.
*
* @author Nikita Koksharov
*
@ -35,6 +35,8 @@ public interface RCountDownLatchAsync extends RObjectAsync {
* thread scheduling purposes.
*
* <p>If the current count equals zero then nothing happens.
*
* @return void
*/
RFuture<Void> countDownAsync();
@ -51,8 +53,8 @@ public interface RCountDownLatchAsync extends RObjectAsync {
* Sets new count value only if previous count already has reached zero
* or is not set at all.
*
* @param count - number of times {@link #countDown} must be invoked
* before threads can pass through {@link #await}
* @param count - number of times <code>countDown</code> must be invoked
* before threads can pass through <code>await</code>
* @return <code>true</code> if new count setted
* <code>false</code> if previous count has not reached zero
*/

@ -28,7 +28,7 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
/**
* Returns executor name
*
* @return
* @return name of service
*/
String getName();
@ -43,6 +43,7 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
* Register workers using custom executor to execute each task
*
* @param workers - workers amount
* @param executor - executor instance
*/
void registerWorkers(int workers, ExecutorService executor);

@ -35,16 +35,17 @@ public interface RExecutorServiceAsync {
/**
* Submit task for execution in async mode with listeners support
*
* @param task
* @return
* @param <T> type of return value
* @param task - task to execute
* @return Future object
*/
<T> RFuture<T> submitAsync(Callable<T> task);
/**
* Submit task for execution in async mode with listeners support
*
* @param task
* @return
* @param task - task to execute
* @return Future object
*/
RFuture<?> submitAsync(Runnable task);

@ -24,13 +24,15 @@ import io.netty.util.concurrent.FutureListener;
*
* @author Nikita Koksharov
*
* @param <V>
* @param <V> type of value
*/
public interface RFuture<V> extends java.util.concurrent.Future<V> {
/**
* Returns {@code true} if and only if the I/O operation was completed
* successfully.
*
* @return {@code true} if future was completed successfully
*/
boolean isSuccess();
@ -49,6 +51,8 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
*
* As it is possible that a {@code null} value is used to mark the future as successful you also need to check
* if the future is really done with {@link #isDone()} and not relay on the returned {@code null} value.
*
* @return object
*/
V getNow();
@ -56,6 +60,8 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* Waits for this future to be completed within the
* specified time limit.
*
* @param timeout - wait timeout
* @param unit - time unit
* @return {@code true} if and only if the future was completed within
* the specified time limit
*
@ -68,6 +74,7 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* Waits for this future to be completed within the
* specified time limit.
*
* @param timeoutMillis - timeout value
* @return {@code true} if and only if the future was completed within
* the specified time limit
*
@ -81,6 +88,9 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* specified listener is notified when this future is
* {@linkplain #isDone() done}. If this future is already
* completed, the specified listener is notified immediately.
*
* @param listener - listener for future object
* @return Future object
*/
RFuture<V> addListener(FutureListener<? super V> listener);
@ -89,6 +99,9 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* specified listeners are notified when this future is
* {@linkplain #isDone() done}. If this future is already
* completed, the specified listeners are notified immediately.
*
* @param listeners - listeners for future object
* @return Future object
*/
RFuture<V> addListeners(FutureListener<? super V>... listeners);
@ -98,6 +111,9 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* future is {@linkplain #isDone() done}. If the specified
* listener is not associated with this future, this method
* does nothing and returns silently.
*
* @param listener - listener for future object
* @return Future object
*/
RFuture<V> removeListener(FutureListener<? super V> listener);
@ -107,18 +123,27 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* future is {@linkplain #isDone() done}. If the specified
* listeners are not associated with this future, this method
* does nothing and returns silently.
*
* @param listeners - listeners for future object
* @return Future object
*/
RFuture<V> removeListeners(FutureListener<? super V>... listeners);
/**
* Waits for this future until it is done, and rethrows the cause of the failure if this future
* failed.
*
* @throws InterruptedException
* if the current thread was interrupted
* @return Future object
*/
RFuture<V> sync() throws InterruptedException;
/**
* Waits for this future until it is done, and rethrows the cause of the failure if this future
* failed.
*
* @return Future object
*/
RFuture<V> syncUninterruptibly();
@ -127,6 +152,7 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
*
* @throws InterruptedException
* if the current thread was interrupted
* @return Future object
*/
RFuture<V> await() throws InterruptedException;
@ -134,6 +160,8 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* Waits for this future to be completed without
* interruption. This method catches an {@link InterruptedException} and
* discards it silently.
*
* @return Future object
*/
RFuture<V> awaitUninterruptibly();
@ -142,6 +170,8 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* specified time limit without interruption. This method catches an
* {@link InterruptedException} and discards it silently.
*
* @param timeout - timeout value
* @param unit - timeout unit value
* @return {@code true} if and only if the future was completed within
* the specified time limit
*/
@ -151,7 +181,8 @@ public interface RFuture<V> extends java.util.concurrent.Future<V> {
* Waits for this future to be completed within the
* specified time limit without interruption. This method catches an
* {@link InterruptedException} and discards it silently.
*
*
* @param timeoutMillis - timeout value
* @return {@code true} if and only if the future was completed within
* the specified time limit
*/

@ -23,14 +23,16 @@ import java.util.Map;
*
* @author Nikita Koksharov
*
* @param <V>
* @param <V> type of value
*/
public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
/**
* Adds geospatial member.
*
* @param entries
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param member - object itself
* @return number of elements added to the sorted set,
* not including elements already existing for which
* the score was updated
@ -40,7 +42,7 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
/**
* Adds geospatial members.
*
* @param entries
* @param entries - objects
* @return number of elements added to the sorted set,
* not including elements already existing for which
* the score was updated
@ -50,28 +52,26 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
/**
* Returns distance between members in <code>GeoUnit</code> units.
*
* @see {@link GeoUnit}
*
* @param firstMember
* @param secondMember
* @param geoUnit
* @return
* @param firstMember - first object
* @param secondMember - second object
* @param geoUnit - geo unit
* @return distance
*/
Double dist(V firstMember, V secondMember, GeoUnit geoUnit);
/**
* Returns 11 characters Geohash string mapped by defined member.
*
* @param members
* @return
* @param members - objects
* @return hash mapped by object
*/
Map<V, String> hash(V... members);
/**
* Returns geo-position mapped by defined member.
*
* @param members
* @return
* @param members - objects
* @return geo position mapped by object
*/
Map<V, GeoPosition> pos(V... members);
@ -81,11 +81,11 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return list of objects
*/
List<V> radius(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -96,11 +96,11 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return distance mapped by object
*/
Map<V, Double> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -111,11 +111,11 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return geo position mapped by object
*/
Map<V, GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -125,11 +125,10 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return list of objects
*/
List<V> radius(V member, double radius, GeoUnit geoUnit);
@ -140,11 +139,10 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return distance mapped by object
*/
Map<V, Double> radiusWithDistance(V member, double radius, GeoUnit geoUnit);
@ -155,11 +153,10 @@ public interface RGeo<V> extends RExpirable, RGeoAsync<V> {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return geo position mapped by object
*/
Map<V, GeoPosition> radiusWithPosition(V member, double radius, GeoUnit geoUnit);

@ -22,14 +22,16 @@ import java.util.Map;
*
* @author Nikita Koksharov
*
* @param <V>
* @param <V> type of value
*/
public interface RGeoAsync<V> extends RExpirableAsync {
/**
* Adds geospatial member.
*
* @param entries
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param member - object itself
* @return number of elements added to the sorted set,
* not including elements already existing for which
* the score was updated
@ -39,7 +41,7 @@ public interface RGeoAsync<V> extends RExpirableAsync {
/**
* Adds geospatial members.
*
* @param entries
* @param entries - objects
* @return number of elements added to the sorted set,
* not including elements already existing for which
* the score was updated
@ -49,28 +51,26 @@ public interface RGeoAsync<V> extends RExpirableAsync {
/**
* Returns distance between members in <code>GeoUnit</code> units.
*
* @see {@link GeoUnit}
*
* @param firstMember
* @param secondMember
* @param geoUnit
* @return
* @param firstMember - first object
* @param secondMember - second object
* @param geoUnit - geo unit
* @return distance
*/
RFuture<Double> distAsync(V firstMember, V secondMember, GeoUnit geoUnit);
/**
* Returns 11 characters Geohash string mapped by defined member.
*
* @param members
* @return
* @param members - objects
* @return hash mapped by object
*/
RFuture<Map<V, String>> hashAsync(V... members);
/**
* Returns geo-position mapped by defined member.
*
* @param members
* @return
* @param members - objects
* @return geo position mapped by object
*/
RFuture<Map<V, GeoPosition>> posAsync(V... members);
@ -80,11 +80,11 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return list of objects
*/
RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -95,11 +95,11 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return distance mapped by object
*/
RFuture<Map<V, Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -110,11 +110,11 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param longitude - longitude of object
* @param latitude - latitude of object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return geo position mapped by object
*/
RFuture<Map<V, GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit);
@ -124,11 +124,10 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return list of objects
*/
RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit);
@ -139,11 +138,10 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return distance mapped by object
*/
RFuture<Map<V, Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit);
@ -154,11 +152,10 @@ public interface RGeoAsync<V> extends RExpirableAsync {
* and the maximum distance from the defined member location (the radius)
* in <code>GeoUnit</code> units.
*
* @param longitude
* @param latitude
* @param radius
* @param geoUnit
* @return
* @param member - object
* @param radius - radius in geo units
* @param geoUnit - geo unit
* @return geo position mapped by object
*/
RFuture<Map<V, GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit);

@ -40,13 +40,13 @@ public interface RKeys extends RKeysAsync {
* Get all keys by pattern using iterator.
* Keys traversed with SCAN operation. Each SCAN operation loads
* up to <b>10</b> keys per request.
* <p/>
* <p>
* Supported glob-style patterns:
* <p/>
* <p>
* h?llo subscribes to hello, hallo and hxllo
* <p/>
* <p>
* h*llo subscribes to hllo and heeeello
* <p/>
* <p>
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern - match pattern
@ -58,13 +58,13 @@ public interface RKeys extends RKeysAsync {
* Get all keys by pattern using iterator.
* Keys traversed with SCAN operation. Each SCAN operation loads
* up to <code>count</code> keys per request.
* <p/>
* <p>
* Supported glob-style patterns:
* <p/>
* <p>
* h?llo subscribes to hello, hallo and hxllo
* <p/>
* <p>
* h*llo subscribes to hllo and heeeello
* <p/>
* <p>
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern - match pattern
@ -102,9 +102,9 @@ public interface RKeys extends RKeysAsync {
/**
* Delete multiple objects by a key pattern.
* <p/>
* <p>
* Method executes in <b>NON atomic way</b> in cluster mode due to lua script limitations.
* <p/>
* <p>
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello

@ -58,9 +58,9 @@ public interface RKeysAsync {
/**
* Delete multiple objects by a key pattern.
* <p/>
* <p>
* Method executes in <b>NON atomic way</b> in cluster mode due to lua script limitations.
* <p/>
* <p>
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello

@ -41,10 +41,10 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* If the specified key is not already associated
* with a value, associate it with the given value.
* <p/>
* <p>
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -60,10 +60,10 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* If the specified key is not already associated
* with a value, associate it with the given value.
* <p/>
* <p>
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -75,7 +75,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.
*
@ -86,7 +86,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -102,7 +102,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -114,7 +114,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.
*
@ -125,10 +125,10 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
* <p/>
* <p>
* Works faster than usual {@link #put(Object, Object, long, TimeUnit)}
* as it not returns previous value.
*
@ -144,10 +144,10 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
/**
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
* <p/>
* <p>
* Works faster than usual {@link #put(Object, Object, long, TimeUnit, long, TimeUnit)}
* as it not returns previous value.
*
@ -159,7 +159,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.

@ -41,7 +41,7 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
/**
* If the specified key is not already associated
* with a value, associate it with the given value.
* <p/>
* <p>
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.
* If the map previously contained a mapping for
@ -59,10 +59,10 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
/**
* If the specified key is not already associated
* with a value, associate it with the given value.
* <p/>
* <p>
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -74,7 +74,7 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.
*
@ -100,7 +100,7 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
/**
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
*
@ -112,7 +112,7 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.
*
@ -123,10 +123,10 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
/**
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
* <p/>
* <p>
* Works faster than usual {@link #put(Object, Object, long, TimeUnit)}
* as it not returns previous value.
*
@ -142,10 +142,10 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
/**
* Stores value mapped by key with specified time to live and max idle time.
* Entry expires when specified time to live or max idle time has expired.
* <p/>
* <p>
* If the map previously contained a mapping for
* the key, the old value is replaced by the specified value.
* <p/>
* <p>
* Works faster than usual {@link #put(Object, Object, long, TimeUnit, long, TimeUnit)}
* as it not returns previous value.
*
@ -157,7 +157,7 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
* @param maxIdleTime - max idle time for key\value entry.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.

@ -31,14 +31,13 @@ public interface RObject extends RObjectAsync {
* @param host - destination host
* @param port - destination port
* @param database - destination database
* @return
*/
void migrate(String host, int port, int database);
/**
* Move object to another database
*
* @param database
* @param database - Redis database number
* @return <code>true</code> if key was moved else <code>false</code>
*/
boolean move(int database);
@ -46,19 +45,21 @@ public interface RObject extends RObjectAsync {
/**
* Returns name of object
*
* @return name
* @return name - name of object
*/
String getName();
/**
* Deletes the object
*
* @return <code>true</code> if it was exist and deleted else <code>false</code>
*/
boolean delete();
/**
* Rename current object key to <code>newName</code>
*
* @param newName
* @param newName - new name of object
*/
void rename(String newName);
@ -66,8 +67,8 @@ public interface RObject extends RObjectAsync {
* Rename current object key to <code>newName</code>
* only if new key is not exists
*
* @param newName
* @return
* @param newName - new name of object
* @return <code>true</code> if object has been renamed successfully and <code>false</code> otherwise
*/
boolean renamenx(String newName);
@ -81,7 +82,7 @@ public interface RObject extends RObjectAsync {
/**
* Returns the underlying Codec used by this RObject
*
* @return
* @return Codec of object
*/
Codec getCodec();
}

@ -30,14 +30,14 @@ public interface RObjectAsync {
* @param host - destination host
* @param port - destination port
* @param database - destination database
* @return
* @return void
*/
RFuture<Void> migrateAsync(String host, int port, int database);
/**
* Move object to another database in async mode
*
* @param database
* @param database - number of Redis database
* @return <code>true</code> if key was moved <code>false</code> if not
*/
RFuture<Boolean> moveAsync(int database);
@ -53,8 +53,8 @@ public interface RObjectAsync {
* Rename current object key to <code>newName</code>
* in async mode
*
* @param newName
* @return
* @param newName - new name of object
* @return void
*/
RFuture<Void> renameAsync(String newName);
@ -62,8 +62,8 @@ public interface RObjectAsync {
* Rename current object key to <code>newName</code>
* in async mode only if new key is not exists
*
* @param newName
* @return
* @param newName - new name of object
* @return <code>true</code> if object has been renamed successfully and <code>false</code> otherwise
*/
RFuture<Boolean> renamenxAsync(String newName);

@ -36,14 +36,14 @@ public interface RObjectReactive {
* @param host - destination host
* @param port - destination port
* @param database - destination database
* @return
* @return void
*/
Publisher<Void> migrate(String host, int port, int database);
/**
* Move object to another database in mode
*
* @param database
* @param database - number of Redis database
* @return <code>true</code> if key was moved <code>false</code> if not
*/
Publisher<Boolean> move(int database);
@ -59,8 +59,8 @@ public interface RObjectReactive {
* Rename current object key to <code>newName</code>
* in mode
*
* @param newName
* @return
* @param newName - new name of object
* @return void
*/
Publisher<Void> rename(String newName);
@ -68,8 +68,8 @@ public interface RObjectReactive {
* Rename current object key to <code>newName</code>
* in mode only if new key is not exists
*
* @param newName
* @return
* @param newName - new name of object
* @return <code>true</code> if object has been renamed successfully and <code>false</code> otherwise
*/
Publisher<Boolean> renamenx(String newName);

@ -20,36 +20,36 @@ import java.util.concurrent.TimeUnit;
/**
* Allows to execute object methods remotely between Redisson instances (Server side and Client side instances in terms of remote invocation).
* <p/>
* <p>
* <b>1. Server side instance (worker instance).</b> Register object with RRemoteService instance.
* <p/>
* <p>
* <code>
* RRemoteService remoteService = redisson.getRemoteService();<br/>
* <br/>
* // register remote service before any remote invocation<br/>
* remoteService.register(SomeServiceInterface.class, someServiceImpl);
* </code>
* <p/>
* <p>
* <b>2. Client side instance.</b> Invokes method remotely.
* <p/>
* <p>
* <code>
* RRemoteService remoteService = redisson.getRemoteService();<br/>
* SomeServiceInterface service = remoteService.get(SomeServiceInterface.class);<br/>
* <br/>
* String result = service.doSomeStuff(1L, "secondParam", new AnyParam());
* </code>
* <p/>
* <p/>
* <p>
* <p>
* There are two timeouts during execution:
* <p/>
* <p>
* <b>Acknowledge (Ack) timeout.</b>Client side instance waits for acknowledge message from Server side instance.
* <p/>
* <p>
* If acknowledge has not been received by Client side instance then <code>RemoteServiceAckTimeoutException</code> will be thrown.
* And next invocation attempt can be made.
* <p/>
* <p>
* If acknowledge has not been received Client side instance but Server side instance has received invocation message already.
* In this case invocation will be skipped, due to ack timeout checking by Server side instance.
* <p/>
* <p>
* <b>Execution timeout.</b> Client side instance received acknowledge message. If it hasn't received any result or error
* from server side during execution timeout then <code>RemoteServiceTimeoutException</code> will be thrown.
*
@ -88,7 +88,7 @@ public interface RRemoteService {
/**
* Get remote service object for remote invocations.
* <p/>
* <p>
* This method is a shortcut for
* <pre>
* get(remoteInterface, RemoteInvocationOptions.defaults())
@ -105,7 +105,7 @@ public interface RRemoteService {
/**
* Get remote service object for remote invocations
* with specified invocation timeout.
* <p/>
* <p>
* This method is a shortcut for
* <pre>
* get(remoteInterface, RemoteInvocationOptions.defaults()
@ -125,7 +125,7 @@ public interface RRemoteService {
/**
* Get remote service object for remote invocations
* with specified invocation and ack timeouts
* <p/>
* <p>
* This method is a shortcut for
* <pre>
* get(remoteInterface, RemoteInvocationOptions.defaults()
@ -148,7 +148,7 @@ public interface RRemoteService {
/**
* Get remote service object for remote invocations
* with the specified options
* <p/>
* <p>
* Note that when using the noResult() option,
* it is expected that the invoked method returns void,
* or else IllegalArgumentException will be thrown.

@ -65,7 +65,7 @@ public interface RScoredSortedSet<V> extends RScoredSortedSetAsync<V>, Iterable<
/**
* Adds element to this set only if has not been added before.
* <p/>
* <p>
* Works only with <b>Redis 3.0.2 and higher.</b>
*
* @param score

@ -53,7 +53,7 @@ public interface RScoredSortedSetAsync<V> extends RExpirableAsync {
/**
* Adds element to this set only if has not been added before.
* <p/>
* <p>
* Works only with <b>Redis 3.0.2 and higher.</b>
*
* @param score

@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
/**
* Distributed and concurrent implementation of {@link java.util.concurrent.Semaphore}.
* <p/>
* <p>
* Works in non-fair mode. Therefore order of acquiring is unpredictable.
*
* @author Nikita Koksharov

@ -34,18 +34,20 @@ public interface RedissonClient {
/**
* Returns geospatial items holder instance by <code>name</code>.
*
* @param name
* @return
* @param <V> type of value
* @param name - name of object
* @return Geo object
*/
<V> RGeo<V> getGeo(String name);
/**
* Returns geospatial items holder instance by <code>name</code>
* using provided codec for geospatial members.
*
* @param name
* @param geospatial member codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for value
* @return Geo object
*/
<V> RGeo<V> getGeo(String name, Codec codec);
@ -54,10 +56,10 @@ public interface RedissonClient {
* Supports value eviction with a given TTL value.
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @return SetCache object
*/
<V> RSetCache<V> getSetCache(String name);
@ -66,10 +68,11 @@ public interface RedissonClient {
* Supports value eviction with a given TTL value.
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return SetCache object
*/
<V> RSetCache<V> getSetCache(String name, Codec codec);
@ -80,9 +83,11 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return MapCache object
*/
<K, V> RMapCache<K, V> getMapCache(String name, Codec codec);
@ -92,16 +97,19 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return MapCache object
*/
<K, V> RMapCache<K, V> getMapCache(String name);
/**
* Returns object holder instance by name.
*
* @param name of object
* @return
* @param <V> type of value
* @param name - name of object
* @return Bucket object
*/
<V> RBucket<V> getBucket(String name);
@ -109,16 +117,17 @@ public interface RedissonClient {
* Returns object holder instance by name
* using provided codec for object.
*
* @param name of object
* @param object codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return Bucket object
*/
<V> RBucket<V> getBucket(String name, Codec codec);
/**
* Returns interface for mass operations with Bucket objects.
*
* @return
* @return Buckets
*/
RBuckets getBuckets();
@ -126,51 +135,58 @@ public interface RedissonClient {
* Returns interface for mass operations with Bucket objects
* using provided codec for object.
*
* @return
* @param codec - codec for bucket objects
* @return Buckets
*/
RBuckets getBuckets(Codec codec);
/**
* Returns HyperLogLog instance by name.
*
* @param name of object
* @return
* @param <V> type of value
* @param name - name of object
* @return HyperLogLog object
*/
<V> RHyperLogLog<V> getHyperLogLog(String name);
/**
* Returns HyperLogLog instance by name
* using provided codec for hll objects.
*
* @param name of object
* @param object codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return HyperLogLog object
*/
<V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec);
/**
* Returns list instance by name.
*
* @param name of object
* @return
* @param <V> type of value
* @param name - name of object
* @return List object
*/
<V> RList<V> getList(String name);
/**
* Returns list instance by name
* using provided codec for list objects.
*
* @param name of object
* @param list object codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return List object
*/
<V> RList<V> getList(String name, Codec codec);
/**
* Returns List based Multimap instance by name.
*
* @param name
* @return
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return ListMultimap object
*/
<K, V> RListMultimap<K, V> getListMultimap(String name);
@ -178,9 +194,11 @@ public interface RedissonClient {
* Returns List based Multimap instance by name
* using provided codec for both map keys and values.
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return ListMultimap object
*/
<K, V> RListMultimap<K, V> getListMultimap(String name, Codec codec);
@ -190,8 +208,10 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return ListMultimapCache object
*/
<K, V> RListMultimapCache<K, V> getListMultimapCache(String name);
@ -202,8 +222,11 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String, Codec)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return ListMultimapCache object
*/
<K, V> RListMultimapCache<K, V> getListMultimapCache(String name, Codec codec);
@ -211,9 +234,11 @@ public interface RedissonClient {
* Returns local cached map instance by name.
* Configured by parameters of options-object.
*
* @param name
* @param options
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param options - local map options
* @return LocalCachedMap object
*/
<K, V> RLocalCachedMap<K, V> getLocalCachedMap(String name, LocalCachedMapOptions options);
@ -221,18 +246,22 @@ public interface RedissonClient {
* Returns local cached map instance by name
* using provided codec. Configured by parameters of options-object.
*
* @param name
* @param codec
* @param options
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @param options - local map options
* @return LocalCachedMap object
*/
<K, V> RLocalCachedMap<K, V> getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions options);
/**
* Returns map instance by name.
*
* @param name of map
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return Map object
*/
<K, V> RMap<K, V> getMap(String name);
@ -240,17 +269,21 @@ public interface RedissonClient {
* Returns map instance by name
* using provided codec for both map keys and values.
*
* @param name of map
* @param map key and value codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return Map object
*/
<K, V> RMap<K, V> getMap(String name, Codec codec);
/**
* Returns Set based Multimap instance by name.
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return SetMultimap object
*/
<K, V> RSetMultimap<K, V> getSetMultimap(String name);
@ -258,9 +291,11 @@ public interface RedissonClient {
* Returns Set based Multimap instance by name
* using provided codec for both map keys and values.
*
* @param name
* @param codec
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return SetMultimap object
*/
<K, V> RSetMultimap<K, V> getSetMultimap(String name, Codec codec);
@ -270,8 +305,10 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return SetMultimapCache object
*/
<K, V> RSetMultimapCache<K, V> getSetMultimapCache(String name);
@ -282,16 +319,19 @@ public interface RedissonClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSetMultimap(String, Codec)}.</p>
*
* @param name
* @return
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return SetMultimapCache object
*/
<K, V> RSetMultimapCache<K, V> getSetMultimapCache(String name, Codec codec);
/**
* Returns semaphore instance by name
*
* @param name of semaphore
* @return
* @param name - name of object
* @return Semaphore object
*/
RSemaphore getSemaphore(String name);
@ -299,63 +339,66 @@ public interface RedissonClient {
* Returns semaphore instance by name.
* Supports lease time parameter for each acquired permit.
*
* @param name
* @return
* @param name - name of object
* @return PermitExpirableSemaphore object
*/
RPermitExpirableSemaphore getPermitExpirableSemaphore(String name);
/**
* Returns lock instance by name.
* <p/>
* <p>
* Implements a <b>non-fair</b> locking so doesn't guarantees an acquire order by threads.
*
* @param name of lock
* @return
* @param name - name of object
* @return Lock object
*/
RLock getLock(String name);
/**
* Returns lock instance by name.
* <p/>
* <p>
* Implements a <b>fair</b> locking so it guarantees an acquire order by threads.
*
* @param name
* @return
* @param name - name of object
* @return Lock object
*/
RLock getFairLock(String name);
/**
* Returns readWriteLock instance by name.
*
* @param name
* @return
* @param name - name of object
* @return Lock object
*/
RReadWriteLock getReadWriteLock(String name);
/**
* Returns set instance by name.
*
* @param name of set
* @return
*
* @param <V> type of value
* @param name - name of object
* @return Lock object
*/
<V> RSet<V> getSet(String name);
/**
* Returns set instance by name
* using provided codec for set objects.
*
* @param name of set
* @param set object codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return Set object
*/
<V> RSet<V> getSet(String name, Codec codec);
/**
* Returns sorted set instance by name.
* This sorted set uses comparator to sort objects.
*
* @param name of sorted set
* @return
*
* @param <V> type of value
* @param name - name of object
* @return SortedSet object
*/
<V> RSortedSet<V> getSortedSet(String name);
@ -363,19 +406,21 @@ public interface RedissonClient {
* Returns sorted set instance by name
* using provided codec for sorted set objects.
* This sorted set sorts objects using comparator.
*
* @param name of sorted set
* @param sorted set object codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return SortedSet object
*/
<V> RSortedSet<V> getSortedSet(String name, Codec codec);
/**
* Returns Redis Sorted Set instance by name.
* This sorted set sorts objects by object score.
*
* @param name of scored sorted set
* @return
*
* @param <V> type of value
* @param name - name of object
* @return ScoredSortedSet object
*/
<V> RScoredSortedSet<V> getScoredSortedSet(String name);
@ -383,10 +428,11 @@ public interface RedissonClient {
* Returns Redis Sorted Set instance by name
* using provided codec for sorted set objects.
* This sorted set sorts objects by object score.
*
* @param name of scored sorted set
* @param scored sorted set object codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return ScoredSortedSet object
*/
<V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec);
@ -394,17 +440,18 @@ public interface RedissonClient {
* Returns String based Redis Sorted Set instance by name
* All elements are inserted with the same score during addition,
* in order to force lexicographical ordering
*
* @param name
* @return
*
* @param name - name of object
* @return LexSortedSet object
*/
RLexSortedSet getLexSortedSet(String name);
/**
* Returns topic instance by name.
*
* @param name of topic
* @return
*
* @param <M> type of message
* @param name - name of object
* @return Topic object
*/
<M> RTopic<M> getTopic(String name);
@ -412,9 +459,10 @@ public interface RedissonClient {
* Returns topic instance by name
* using provided codec for messages.
*
* @param name of topic
* @param message codec
* @return
* @param <M> type of message
* @param name - name of object
* @param codec - codec for message
* @return Topic object
*/
<M> RTopic<M> getTopic(String name, Codec codec);
@ -425,9 +473,10 @@ public interface RedissonClient {
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
*
* @param <M> type of message
* @param pattern of the topic
* @return
* @return PatterTopic object
*/
<M> RPatternTopic<M> getPatternTopic(String pattern);
@ -439,18 +488,20 @@ public interface RedissonClient {
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
*
* @param <M> type of message
* @param pattern of the topic
* @param message codec
* @return
* @param codec - codec for message
* @return PatterTopic object
*/
<M> RPatternTopic<M> getPatternTopic(String pattern, Codec codec);
/**
* Returns unbounded queue instance by name.
*
* @param name of queue
* @return
* @param <V> type of value
* @param name - name of object
* @return Queue object
*/
<V> RQueue<V> getQueue(String name);
@ -458,121 +509,131 @@ public interface RedissonClient {
* Returns unbounded queue instance by name
* using provided codec for queue objects.
*
* @param name of queue
* @param queue objects codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for message
* @return Queue object
*/
<V> RQueue<V> getQueue(String name, Codec codec);
/**
* Returns unbounded blocking queue instance by name.
*
* @param name of queue
* @return
*
* @param <V> type of value
* @param name - name of object
* @return BlockingQueue object
*/
<V> RBlockingQueue<V> getBlockingQueue(String name);
/**
* Returns unbounded blocking queue instance by name
* using provided codec for queue objects.
*
* @param name of queue
* @param queue objects codec
* @return
*
* @param <V> type of value
* @param name - name of queue
* @param codec - queue objects codec
* @return BlockingQueue object
*/
<V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec);
/**
* Returns bounded blocking queue instance by name.
*
* @param <V> type of value
* @param name of queue
* @return
* @return BoundedBlockingQueue object
*/
<V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name);
/**
* Returns bounded blocking queue instance by name
* using provided codec for queue objects.
*
* @param name of queue
* @param queue objects codec
* @return
*
* @param <V> type of value
* @param name - name of queue
* @param codec - codec for values
* @return BoundedBlockingQueue object
*/
<V> RBoundedBlockingQueue<V> getBoundedBlockingQueue(String name, Codec codec);
/**
* Returns unbounded deque instance by name.
*
* @param name of deque
* @return
*
* @param <V> type of value
* @param name - name of object
* @return Deque object
*/
<V> RDeque<V> getDeque(String name);
/**
* Returns unbounded deque instance by name
* using provided codec for deque objects.
*
* @param name of deque
* @param deque objects codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return Deque object
*/
<V> RDeque<V> getDeque(String name, Codec codec);
/**
* Returns unbounded blocking deque instance by name.
*
* @param name of deque
* @return
*
* @param <V> type of value
* @param name - name of object
* @return BlockingDeque object
*/
<V> RBlockingDeque<V> getBlockingDeque(String name);
/**
* Returns unbounded blocking deque instance by name
* using provided codec for deque objects.
*
* @param name of deque
* @param deque objects codec
* @return
*
* @param <V> type of value
* @param name - name of object
* @param codec - deque objects codec
* @return BlockingDeque object
*/
<V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec);
/**
* Returns atomicLong instance by name.
*
* @param name of atomicLong
* @return
* @param name - name of object
* @return AtomicLong object
*/
RAtomicLong getAtomicLong(String name);
/**
* Returns atomicDouble instance by name.
*
* @param name of atomicLong
* @return
* @param name - name of object
* @return AtomicDouble object
*/
RAtomicDouble getAtomicDouble(String name);
/**
* Returns countDownLatch instance by name.
*
* @param name of countDownLatch
* @return
* @param name - name of object
* @return CountDownLatch object
*/
RCountDownLatch getCountDownLatch(String name);
/**
* Returns bitSet instance by name.
*
* @param name of bitSet
* @return
* @param name - name of object
* @return BitSet object
*/
RBitSet getBitSet(String name);
/**
* Returns bloom filter instance by name.
*
* @param name of bloom filter
* @return
*
* @param <V> type of value
* @param name - name of object
* @return BloomFilter object
*/
<V> RBloomFilter<V> getBloomFilter(String name);
@ -580,22 +641,25 @@ public interface RedissonClient {
* Returns bloom filter instance by name
* using provided codec for objects.
*
* @param name of bloom filter
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for values
* @return BloomFilter object
*/
<V> RBloomFilter<V> getBloomFilter(String name, Codec codec);
/**
* Returns script operations object
*
* @return
* @return Script object
*/
RScript getScript();
/**
* Returns ScheduledExecutorService by name
*
* @return
* @param name - name of object
* @return ScheduledExecutorService object
*/
RScheduledExecutorService getExecutorService(String name);
@ -603,14 +667,16 @@ public interface RedissonClient {
* Returns ScheduledExecutorService by name
* using provided codec for task, response and request serialization
*
* @return
* @param name - name of object
* @param codec - codec for task, response and request
* @return ScheduledExecutorService object
*/
RScheduledExecutorService getExecutorService(Codec codec, String name);
/**
* Returns object for remote operations prefixed with the default name (redisson_remote_service)
*
* @return
* @return RemoteService object
*/
RRemoteService getRemoteSerivce();
@ -618,15 +684,16 @@ public interface RedissonClient {
* Returns object for remote operations prefixed with the default name (redisson_remote_service)
* and uses provided codec for method arguments and result.
*
* @return
* @param codec - codec for response and request
* @return RemoteService object
*/
RRemoteService getRemoteSerivce(Codec codec);
/**
* Returns object for remote operations prefixed with the specified name
*
* @param name The name used as the Redis key prefix for the services
* @return
* @param name - the name used as the Redis key prefix for the services
* @return RemoteService object
*/
RRemoteService getRemoteSerivce(String name);
@ -634,8 +701,9 @@ public interface RedissonClient {
* Returns object for remote operations prefixed with the specified name
* and uses provided codec for method arguments and result.
*
* @param name The name used as the Redis key prefix for the services
* @return
* @param name - the name used as the Redis key prefix for the services
* @param codec - codec for response and request
* @return RemoteService object
*/
RRemoteService getRemoteSerivce(String name, Codec codec);
@ -645,7 +713,7 @@ public interface RedissonClient {
*
* See <a href="http://redis.io/topics/pipelining">http://redis.io/topics/pipelining</a>
*
* @return
* @return Batch object
*/
RBatch createBatch();
@ -653,7 +721,7 @@ public interface RedissonClient {
* Returns interface with methods for Redis keys.
* Each of Redis/Redisson object associated with own key
*
* @return
* @return Keys object
*/
RKeys getKeys();
@ -661,7 +729,7 @@ public interface RedissonClient {
* Returns RedissonAttachedLiveObjectService which can be used to
* retrieve live REntity(s)
*
* @return
* @return LiveObjectService object
*/
RLiveObjectService getLiveObjectService();
@ -698,14 +766,14 @@ public interface RedissonClient {
/**
* Returns the CodecProvider instance
*
* @return CodecProvider
* @return CodecProvider object
*/
public CodecProvider getCodecProvider();
/**
* Returns the ResolverProvider instance
*
* @return resolverProvider
* @return ResolverProvider object
*/
public ResolverProvider getResolverProvider();
@ -713,21 +781,21 @@ public interface RedissonClient {
/**
* Get Redis nodes group for server operations
*
* @return
* @return NodesGroup object
*/
NodesGroup<Node> getNodesGroup();
/**
* Get Redis cluster nodes group for server operations
*
* @return
* @return ClusterNodesGroup object
*/
ClusterNodesGroup getClusterNodesGroup();
/**
* Returns {@code true} if this Redisson instance has been shut down.
*
* @return
* @return code true} if this Redisson instance has been shut down overwise <code>false</code>
*/
boolean isShutdown();
@ -735,7 +803,8 @@ public interface RedissonClient {
* Returns {@code true} if this Redisson instance was started to be shutdown
* or was shutdown {@link #isShutdown()} already.
*
* @return
* @return {@code true} if this Redisson instance was started to be shutdown
* or was shutdown {@link #isShutdown()} already.
*/
boolean isShuttingDown();

@ -27,7 +27,7 @@ public interface RedissonNodeInitializer {
/**
* Invoked during Redisson Node startup
*
* @param redissonNode
* @param redissonNode - Redisson Node instance
*/
void onStartup(RedissonNode redissonNode);

@ -36,9 +36,9 @@ public interface RedissonReactiveClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of values
* @param name - name of object
* @return SetCache object
*/
<V> RSetCacheReactive<V> getSetCache(String name);
@ -48,9 +48,10 @@ public interface RedissonReactiveClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getSet(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <V> type of values
* @param name - name of object
* @param codec - codec for values
* @return SetCache object
*/
<V> RSetCacheReactive<V> getSetCache(String name, Codec codec);
@ -61,9 +62,11 @@ public interface RedissonReactiveClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String, Codec)}.</p>
*
* @param name
* @param codec
* @return
* @param <K> type of keys
* @param <V> type of values
* @param name - name of object
* @param codec - codec for values
* @return MapCache object
*/
<K, V> RMapCacheReactive<K, V> getMapCache(String name, Codec codec);
@ -73,16 +76,19 @@ public interface RedissonReactiveClient {
*
* <p>If eviction is not required then it's better to use regular map {@link #getMap(String)}.</p>
*
* @param name
* @return
* @param <K> type of keys
* @param <V> type of values
* @param name - name of object
* @return MapCache object
*/
<K, V> RMapCacheReactive<K, V> getMapCache(String name);
/**
* Returns object holder instance by name
*
* @param name of object
* @return
*
* @param <V> type of value
* @param name - name of object
* @return Bucket object
*/
<V> RBucketReactive<V> getBucket(String name);
@ -90,22 +96,28 @@ public interface RedissonReactiveClient {
* Returns object holder instance by name
* using provided codec for object.
*
* @param name of object
* @param object codec
* @return
* @param <V> type of value
* @param name - name of object
* @param codec - codec for value
* @return Bucket object
*/
<V> RBucketReactive<V> getBucket(String name, Codec codec);
/**
* Returns a list of object holder instances by a key pattern
*
* @param <V> type of value
* @param pattern - pattern for name of buckets
* @return list of buckets
*/
<V> List<RBucketReactive<V>> findBuckets(String pattern);
/**
* Returns HyperLogLog instance by name.
*
* @param name of object
* @return
*
* @param <V> type of values
* @param name - name of object
* @return HyperLogLog object
*/
<V> RHyperLogLogReactive<V> getHyperLogLog(String name);
@ -113,17 +125,19 @@ public interface RedissonReactiveClient {
* Returns HyperLogLog instance by name
* using provided codec for hll objects.
*
* @param name of object
* @param object codec
* @return
* @param <V> type of values
* @param name - name of object
* @param codec - codec of values
* @return HyperLogLog object
*/
<V> RHyperLogLogReactive<V> getHyperLogLog(String name, Codec codec);
/**
* Returns list instance by name.
*
* @param name of object
* @return
* @param <V> type of values
* @param name - name of object
* @return List object
*/
<V> RListReactive<V> getList(String name);
@ -131,17 +145,20 @@ public interface RedissonReactiveClient {
* Returns list instance by name
* using provided codec for list objects.
*
* @param name of object
* @param list object codec
* @return
* @param <V> type of values
* @param name - name of object
* @param codec - codec for values
* @return List object
*/
<V> RListReactive<V> getList(String name, Codec codec);
/**
* Returns map instance by name.
*
* @param name of map
* @return
* @param <K> type of keys
* @param <V> type of values
* @param name - name of object
* @return Map object
*/
<K, V> RMapReactive<K, V> getMap(String name);
@ -149,17 +166,20 @@ public interface RedissonReactiveClient {
* Returns map instance by name
* using provided codec for both map keys and values.
*
* @param name of map
* @param map key and value codec
* @return
* @param <K> type of keys
* @param <V> type of values
* @param name - name of object
* @param codec - codec for keys and values
* @return Map object
*/
<K, V> RMapReactive<K, V> getMap(String name, Codec codec);
/**
* Returns set instance by name.
*
* @param name of set
* @return
* @param <V> type of values
* @param name - name of object
* @return Set object
*/
<V> RSetReactive<V> getSet(String name);
@ -167,18 +187,20 @@ public interface RedissonReactiveClient {
* Returns set instance by name
* using provided codec for set objects.
*
* @param name of set
* @param set object codec
* @return
* @param <V> type of values
* @param name - name of set
* @param codec - codec for values
* @return Set object
*/
<V> RSetReactive<V> getSet(String name, Codec codec);
/**
* Returns Redis Sorted Set instance by name.
* This sorted set sorts objects by object score.
*
*
* @param <V> type of values
* @param name of scored sorted set
* @return
* @return ScoredSortedSet object
*/
<V> RScoredSortedSetReactive<V> getScoredSortedSet(String name);
@ -186,10 +208,11 @@ public interface RedissonReactiveClient {
* Returns Redis Sorted Set instance by name
* using provided codec for sorted set objects.
* This sorted set sorts objects by object score.
*
* @param name of scored sorted set
* @param scored sorted set object codec
* @return
*
* @param <V> type of values
* @param name - name of scored sorted set
* @param codec - codec for values
* @return ScoredSortedSet object
*/
<V> RScoredSortedSetReactive<V> getScoredSortedSet(String name, Codec codec);
@ -198,16 +221,17 @@ public interface RedissonReactiveClient {
* All elements are inserted with the same score during addition,
* in order to force lexicographical ordering
*
* @param name
* @return
* @param name - name of object
* @return LexSortedSet object
*/
RLexSortedSetReactive getLexSortedSet(String name);
/**
* Returns topic instance by name.
*
* @param name of topic
* @return
* @param <M> type of message
* @param name - name of object
* @return Topic object
*/
<M> RTopicReactive<M> getTopic(String name);
@ -215,9 +239,10 @@ public interface RedissonReactiveClient {
* Returns topic instance by name
* using provided codec for messages.
*
* @param name of topic
* @param message codec
* @return
* @param <M> type of message
* @param name - name of object
* @param codec - codec for message
* @return Topic object
*/
<M> RTopicReactive<M> getTopic(String name, Codec codec);
@ -229,8 +254,9 @@ public interface RedissonReactiveClient {
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param <M> type of message
* @param pattern of the topic
* @return
* @return PatternTopic object
*/
<M> RPatternTopicReactive<M> getPatternTopic(String pattern);
@ -243,63 +269,70 @@ public interface RedissonReactiveClient {
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param <M> type of message
* @param pattern of the topic
* @param message codec
* @return
* @param codec - codec for message
* @return PatternTopic object
*/
<M> RPatternTopicReactive<M> getPatternTopic(String pattern, Codec codec);
/**
* Returns queue instance by name.
*
* @param name of queue
* @return
* @param <V> type of values
* @param name - name of object
* @return Queue object
*/
<V> RQueueReactive<V> getQueue(String name);
/**
* Returns queue instance by name
* using provided codec for queue objects.
*
* @param name of queue
* @param queue objects codec
* @return
*
* @param <V> type of values
* @param name - name of object
* @param codec - codec for values
* @return Queue object
*/
<V> RQueueReactive<V> getQueue(String name, Codec codec);
/**
* Returns blocking queue instance by name.
*
* @param name of queue
* @return
*
* @param <V> type of values
* @param name - name of object
* @return BlockingQueue object
*/
<V> RBlockingQueueReactive<V> getBlockingQueue(String name);
/**
* Returns blocking queue instance by name
* using provided codec for queue objects.
*
* @param name of queue
* @param queue objects codec
* @return
*
* @param <V> type of values
* @param name - name of object
* @param codec - code for values
* @return BlockingQueue object
*/
<V> RBlockingQueueReactive<V> getBlockingQueue(String name, Codec codec);
/**
* Returns deque instance by name.
*
* @param name of deque
* @return
*
* @param <V> type of values
* @param name - name of object
* @return Deque object
*/
<V> RDequeReactive<V> getDeque(String name);
/**
* Returns deque instance by name
* using provided codec for deque objects.
*
* @param name of deque
* @param deque objects codec
* @return
*
* @param <V> type of values
* @param name - name of object
* @param codec - coded for values
* @return Deque object
*/
<V> RDequeReactive<V> getDeque(String name, Codec codec);
@ -307,22 +340,22 @@ public interface RedissonReactiveClient {
* Returns "atomic long" instance by name.
*
* @param name of the "atomic long"
* @return
* @return AtomicLong object
*/
RAtomicLongReactive getAtomicLong(String name);
/**
* Returns bitSet instance by name.
*
* @param name of bitSet
* @return
* @param name - name of object
* @return BitSet object
*/
RBitSetReactive getBitSet(String name);
/**
* Returns script operations object
*
* @return
* @return Script object
*/
RScriptReactive getScript();
@ -332,7 +365,7 @@ public interface RedissonReactiveClient {
*
* See <a href="http://redis.io/topics/pipelining">http://redis.io/topics/pipelining</a>
*
* @return
* @return Batch object
*/
RBatchReactive createBatch();
@ -340,7 +373,7 @@ public interface RedissonReactiveClient {
* Returns keys operations.
* Each of Redis/Redisson object associated with own key
*
* @return
* @return Keys object
*/
RKeysReactive getKeys();
@ -361,28 +394,28 @@ public interface RedissonReactiveClient {
/**
* Returns the CodecProvider instance
*
* @return CodecProvider
* @return CodecProvider object
*/
CodecProvider getCodecProvider();
/**
* Get Redis nodes group for server operations
*
* @return
* @return NodesGroup object
*/
NodesGroup<Node> getNodesGroup();
/**
* Get Redis cluster nodes group for server operations
*
* @return
* @return NodesGroup object
*/
NodesGroup<ClusterNode> getClusterNodesGroup();
/**
* Returns {@code true} if this Redisson instance has been shut down.
*
* @return
* @return <code>true</code> if this Redisson instance has been shut down otherwise <code>false</code>
*/
boolean isShutdown();
@ -390,7 +423,8 @@ public interface RedissonReactiveClient {
* Returns {@code true} if this Redisson instance was started to be shutdown
* or was shutdown {@link #isShutdown()} already.
*
* @return
* @return <code>true</code> if this Redisson instance was started to be shutdown
* or was shutdown {@link #isShutdown()} already otherwise <code>false</code>
*/
boolean isShuttingDown();

@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
* Used to tune how RRemoteService will behave
* in regard to the remote invocations acknowledgement
* and execution timeout.
* <p/>
* <p>
* Examples:
* <pre>
* // 1 second ack timeout and 30 seconds execution timeout
@ -73,13 +73,15 @@ public class RemoteInvocationOptions implements Serializable {
/**
* Creates a new instance of RemoteInvocationOptions with opinionated defaults.
* <p/>
* <p>
* This is equivalent to:
* <pre>
* new RemoteInvocationOptions()
* .expectAckWithin(1, TimeUnit.SECONDS)
* .expectResultWithin(30, TimeUnit.SECONDS)
* </pre>
*
* @return RemoteInvocationOptions object
*/
public static RemoteInvocationOptions defaults() {
return new RemoteInvocationOptions()

@ -23,10 +23,10 @@ import java.lang.annotation.Target;
/**
* Annotation used to mark interface as asynchronous
* client interface for remote service interface.
* <p/>
* <p>
* All method signatures must match with remote service interface,
* but return type must be <code>io.netty.util.concurrent.Future</code>.
* <p/>
* <p>
* It's not necessary to add all methods from remote service.
* Add only those which are needed.
*
@ -40,7 +40,7 @@ public @interface RRemoteAsync {
/**
* Remote interface class used to register
*
* @return
* @return class used to register
*/
Class<?> value();

@ -74,9 +74,9 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'slave' servers connection pool size for <b>each</b> slave node.
* <p/>
* <p>
* Default is <code>250</code>
* <p/>
* <p>
* @see #setSlaveConnectionMinimumIdleSize(int)
*
* @param slaveConnectionPoolSize
@ -92,7 +92,7 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'master' server connection pool size.
* <p/>
* <p>
* Default is <code>250</code>
*
* @see #setMasterConnectionMinimumIdleSize(int)
@ -126,9 +126,9 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'slave' node maximum subscription (pub/sub) connection pool size for <b>each</b> slave node
* <p/>
* <p>
* Default is <code>50</code>
* <p/>
* <p>
* @see #setSlaveSubscriptionConnectionMinimumIdleSize(int)
*
*/
@ -142,9 +142,9 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'slave' node minimum idle connection amount for <b>each</b> slave node
* <p/>
* <p>
* Default is <code>5</code>
* <p/>
* <p>
* @see #setSlaveConnectionPoolSize(int)
*
*/
@ -158,9 +158,9 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'master' node minimum idle connection amount for <b>each</b> slave node
* <p/>
* <p>
* Default is <code>5</code>
* <p/>
* <p>
* @see #setMasterConnectionPoolSize(int)
*
*/
@ -174,9 +174,9 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Redis 'slave' node minimum idle subscription (pub/sub) connection amount for <b>each</b> slave node.
* <p/>
* <p>
* Default is <code>1</code>
* <p/>
* <p>
* @see #setSlaveSubscriptionConnectionPoolSize(int)
*
*/
@ -190,7 +190,7 @@ public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig
/**
* Set node type used for read operation.
* <p/>
* <p>
* Default is <code>SLAVE</code>
*
* @param readMode

@ -353,9 +353,9 @@ public class Config {
/**
* Threads amount shared between all redis node clients.
* <p/>
* <p>
* Default is <code>0</code>.
* <p/>
* <p>
* <code>0</code> means <code>current_processors_amount * 2</code>
*
* @param threads
@ -419,7 +419,7 @@ public class Config {
* own threads and each Redisson client creates own EventLoopGroup by default.
* So if there are multiple Redisson instances in same JVM
* it would be useful to share one EventLoopGroup among them.
* <p/>
* <p>
* Only {@link io.netty.channel.epoll.EpollEventLoopGroup} or
* {@link io.netty.channel.nio.NioEventLoopGroup} can be used.
*

@ -20,7 +20,7 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer;
/**
* A thread gate, that uses an {@link java.util.concurrent.locks.AbstractQueuedSynchronizer}.
* <p/>
* <p>
* This implementation allows you to create a latch with a default state (open or closed), and repeatedly open or close
* the latch.
*

@ -18,7 +18,7 @@ package org.redisson.remote;
/**
* Rises when remote method executor has not answered
* within Ack timeout.
* <p/>
* <p>
* Method invocation has not been started in this case.
* So a new invocation attempt can be made.
*

@ -51,7 +51,7 @@ public class CacheConfig {
* @param maxIdleTime - max idle time for key\value entry in milliseconds.
* If <code>0</code> then max idle time doesn't affect entry expiration.
* @param maxIdleUnit
* <p/>
* <p>
* if <code>maxIdleTime</code> and <code>ttl</code> params are equal to <code>0</code>
* then entry stores infinitely.
*/

@ -69,7 +69,7 @@ public class RedissonSpringCacheManager implements CacheManager, ResourceLoaderA
/**
* Creates CacheManager supplied by Redisson instance, Codec instance
* and Cache config mapped by Cache name.
* <p/>
* <p>
* Each Cache instance share one Codec instance.
*
* @param redisson
@ -84,7 +84,7 @@ public class RedissonSpringCacheManager implements CacheManager, ResourceLoaderA
/**
* Creates CacheManager supplied by Redisson instance
* and Cache config mapped by Cache name.
* <p/>
* <p>
* Loads the config file from the class path, interpreting plain paths as class path resource names
* that include the package path (e.g. "mypackage/myresource.txt").
*
@ -98,9 +98,9 @@ public class RedissonSpringCacheManager implements CacheManager, ResourceLoaderA
/**
* Creates CacheManager supplied by Redisson instance, Codec instance
* and Config location path.
* <p/>
* <p>
* Each Cache instance share one Codec instance.
* <p/>
* <p>
* Loads the config file from the class path, interpreting plain paths as class path resource names
* that include the package path (e.g. "mypackage/myresource.txt").
*
@ -211,5 +211,5 @@ public class RedissonSpringCacheManager implements CacheManager, ResourceLoaderA
}
}
}
}

Loading…
Cancel
Save