Class RedissonBatch
- java.lang.Object
-
- org.redisson.RedissonBatch
-
-
Constructor Summary
Constructors Constructor Description RedissonBatch(EvictionScheduler evictionScheduler, CommandAsyncExecutor executor, BatchOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddiscard()Discard batched commands and release allocated buffers used for parameters encoding.RFuture<Void>discardAsync()Discard batched commands and release allocated buffers used for parameters encoding.BatchResult<?>execute()Executes all operations accumulated during async methods invocations.RFuture<BatchResult<?>>executeAsync()Executes all operations accumulated during async methods invocations asynchronously.RAtomicDoubleAsyncgetAtomicDouble(String name)Returns atomicDouble instance by name.RAtomicLongAsyncgetAtomicLong(String name)Returns atomicLong instance by name.RBitSetAsyncgetBitSet(String name)Returns bitSet instance by name.<V> RBlockingDequeAsync<V>getBlockingDeque(String name)Returns blocking deque instance by name.<V> RBlockingDequeAsync<V>getBlockingDeque(String name, Codec codec)<V> RBlockingQueueAsync<V>getBlockingQueue(String name)Returns blocking queue instance by name.<V> RBlockingQueueAsync<V>getBlockingQueue(String name, Codec codec)<V> RBucketAsync<V>getBucket(String name)Returns object holder byname<V> RBucketAsync<V>getBucket(String name, Codec codec)<V> RDequeAsync<V>getDeque(String name)Returns deque instance by name.<V> RDequeAsync<V>getDeque(String name, Codec codec)<V> RGeoAsync<V>getGeo(String name)Returns geospatial items holder instance byname.<V> RGeoAsync<V>getGeo(String name, Codec codec)Returns geospatial items holder instance bynameusing provided codec for geospatial members.<V> RHyperLogLogAsync<V>getHyperLogLog(String name)Returns HyperLogLog object<V> RHyperLogLogAsync<V>getHyperLogLog(String name, Codec codec)RKeysAsyncgetKeys()Returns keys operations.RLexSortedSetAsyncgetLexSortedSet(String name)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<V> RListAsync<V>getList(String name)Returns list instance by name.<V> RListAsync<V>getList(String name, Codec codec)<K,V>
RMultimapAsync<K,V>getListMultimap(String name)Returns List based MultiMap instance by name.<K,V>
RMultimapAsync<K,V>getListMultimap(String name, Codec codec)Returns List based MultiMap instance by name using provided codec for both map keys and values.<K,V>
RMultimapCacheAsync<K,V>getListMultimapCache(String name)Returns List based Multimap instance by name.<K,V>
RMultimapCacheAsync<K,V>getListMultimapCache(String name, Codec codec)Returns List based Multimap instance by name using provided codec for both map keys and values.<K,V>
RMapAsync<K,V>getMap(String name)Returns map instance by name.<K,V>
RMapAsync<K,V>getMap(String name, Codec codec)<K,V>
RMapCacheAsync<K,V>getMapCache(String name)Returns map-based cache instance byname.<K,V>
RMapCacheAsync<K,V>getMapCache(String name, Codec codec)Returns map-based cache instance bynameusing providedcodecfor both cache keys and values.<V> RQueueAsync<V>getQueue(String name)Returns queue instance by name.<V> RQueueAsync<V>getQueue(String name, Codec codec)<V> RScoredSortedSetAsync<V>getScoredSortedSet(String name)Returns Redis Sorted Set instance by name<V> RScoredSortedSetAsync<V>getScoredSortedSet(String name, Codec codec)RScriptAsyncgetScript()Returns script operations objectRScriptgetScript(Codec codec)Returns script operations object using provided codec.<V> RSetAsync<V>getSet(String name)Returns set instance by name.<V> RSetAsync<V>getSet(String name, Codec codec)<V> RSetCacheAsync<V>getSetCache(String name)Returns set-based cache instance byname.<V> RSetCacheAsync<V>getSetCache(String name, Codec codec)Returns set-based cache instance bynameusing providedcodecfor values.<K,V>
RMultimapAsync<K,V>getSetMultimap(String name)Returns Set based MultiMap instance by name.<K,V>
RMultimapAsync<K,V>getSetMultimap(String name, Codec codec)Returns Set based MultiMap instance by name using provided codec for both map keys and values.<K,V>
RMultimapCacheAsync<K,V>getSetMultimapCache(String name)Returns Set based Multimap instance by name.<K,V>
RMultimapCacheAsync<K,V>getSetMultimapCache(String name, Codec codec)Returns Set based Multimap instance by name using provided codec for both map keys and values.<K,V>
RStreamAsync<K,V>getStream(String name)Returns stream instance byname<K,V>
RStreamAsync<K,V>getStream(String name, Codec codec)Returns stream instance bynameusing providedcodecfor entries.RTopicAsyncgetTopic(String name)Returns topic instance by name.RTopicAsyncgetTopic(String name, Codec codec)
-
-
-
Constructor Detail
-
RedissonBatch
public RedissonBatch(EvictionScheduler evictionScheduler, CommandAsyncExecutor executor, BatchOptions options)
-
-
Method Detail
-
getBucket
public <V> RBucketAsync<V> getBucket(String name)
Description copied from interface:RBatchReturns object holder byname
-
getBucket
public <V> RBucketAsync<V> getBucket(String name, Codec codec)
-
getHyperLogLog
public <V> RHyperLogLogAsync<V> getHyperLogLog(String name)
Description copied from interface:RBatchReturns HyperLogLog object- Specified by:
getHyperLogLogin interfaceRBatch- Type Parameters:
V- type of object- Parameters:
name- - name of object- Returns:
- HyperLogLog object
-
getHyperLogLog
public <V> RHyperLogLogAsync<V> getHyperLogLog(String name, Codec codec)
- Specified by:
getHyperLogLogin interfaceRBatch
-
getList
public <V> RListAsync<V> getList(String name)
Description copied from interface:RBatchReturns list instance by name.
-
getList
public <V> RListAsync<V> getList(String name, Codec codec)
-
getMap
public <K,V> RMapAsync<K,V> getMap(String name)
Description copied from interface:RBatchReturns map instance by name.
-
getSet
public <V> RSetAsync<V> getSet(String name)
Description copied from interface:RBatchReturns set instance by name.
-
getTopic
public RTopicAsync getTopic(String name)
Description copied from interface:RBatchReturns topic instance by name.
-
getTopic
public RTopicAsync getTopic(String name, Codec codec)
-
getQueue
public <V> RQueueAsync<V> getQueue(String name)
Description copied from interface:RBatchReturns queue instance by name.
-
getQueue
public <V> RQueueAsync<V> getQueue(String name, Codec codec)
-
getBlockingQueue
public <V> RBlockingQueueAsync<V> getBlockingQueue(String name)
Description copied from interface:RBatchReturns blocking queue instance by name.- Specified by:
getBlockingQueuein interfaceRBatch- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingQueue object
-
getBlockingQueue
public <V> RBlockingQueueAsync<V> getBlockingQueue(String name, Codec codec)
- Specified by:
getBlockingQueuein interfaceRBatch
-
getBlockingDeque
public <V> RBlockingDequeAsync<V> getBlockingDeque(String name)
Description copied from interface:RBatchReturns blocking deque instance by name.- Specified by:
getBlockingDequein interfaceRBatch- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- BlockingDeque object
-
getBlockingDeque
public <V> RBlockingDequeAsync<V> getBlockingDeque(String name, Codec codec)
- Specified by:
getBlockingDequein interfaceRBatch
-
getDeque
public <V> RDequeAsync<V> getDeque(String name)
Description copied from interface:RBatchReturns deque instance by name.
-
getDeque
public <V> RDequeAsync<V> getDeque(String name, Codec codec)
-
getAtomicLong
public RAtomicLongAsync getAtomicLong(String name)
Description copied from interface:RBatchReturns atomicLong instance by name.- Specified by:
getAtomicLongin interfaceRBatch- Parameters:
name- - name of object- Returns:
- AtomicLong object
-
getAtomicDouble
public RAtomicDoubleAsync getAtomicDouble(String name)
Description copied from interface:RBatchReturns atomicDouble instance by name.- Specified by:
getAtomicDoublein interfaceRBatch- Parameters:
name- - name of object- Returns:
- AtomicDouble object
-
getScoredSortedSet
public <V> RScoredSortedSetAsync<V> getScoredSortedSet(String name)
Description copied from interface:RBatchReturns Redis Sorted Set instance by name- Specified by:
getScoredSortedSetin interfaceRBatch- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- ScoredSortedSet object
-
getScoredSortedSet
public <V> RScoredSortedSetAsync<V> getScoredSortedSet(String name, Codec codec)
- Specified by:
getScoredSortedSetin interfaceRBatch
-
getLexSortedSet
public RLexSortedSetAsync getLexSortedSet(String name)
Description copied from interface:RBatchReturns String based Redis Sorted Set instance by name All elements are inserted with the same score during addition, in order to force lexicographical ordering- Specified by:
getLexSortedSetin interfaceRBatch- Parameters:
name- - name of object- Returns:
- LexSortedSet object
-
getBitSet
public RBitSetAsync getBitSet(String name)
Description copied from interface:RBatchReturns bitSet instance by name.
-
getMapCache
public <K,V> RMapCacheAsync<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RBatchReturns map-based cache instance bynameusing providedcodecfor both cache keys and values. Supports entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getMap(String, Codec).- Specified by:
getMapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheAsync<K,V> getMapCache(String name)
Description copied from interface:RBatchReturns map-based cache instance byname. Supports entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getMap(String).- Specified by:
getMapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- MapCache object
-
getScript
public RScriptAsync getScript()
Description copied from interface:RBatchReturns script operations object
-
getScript
public RScript getScript(Codec codec)
Description copied from interface:RBatchReturns script operations object using provided codec.
-
getKeys
public RKeysAsync getKeys()
Description copied from interface:RBatchReturns keys operations. Each of Redis/Redisson object associated with own key
-
getSetCache
public <V> RSetCacheAsync<V> getSetCache(String name)
Description copied from interface:RBatchReturns set-based cache instance byname. Uses map (value_hash, value) under the hood for minimal memory consumption. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSet(String, Codec).- Specified by:
getSetCachein interfaceRBatch- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheAsync<V> getSetCache(String name, Codec codec)
Description copied from interface:RBatchReturns set-based cache instance bynameusing providedcodecfor values. Uses map (value_hash, value) under the hood for minimal memory consumption. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSet(String, Codec).- Specified by:
getSetCachein interfaceRBatch- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SetCache object
-
execute
public BatchResult<?> execute()
Description copied from interface:RBatchExecutes all operations accumulated during async methods invocations.If cluster configuration used then operations are grouped by slot ids and may be executed on different servers. Thus command execution order could be changed
-
executeAsync
public RFuture<BatchResult<?>> executeAsync()
Description copied from interface:RBatchExecutes all operations accumulated during async methods invocations asynchronously.In cluster configurations operations grouped by slot ids so may be executed on different servers. Thus command execution order could be changed
- Specified by:
executeAsyncin interfaceRBatch- Returns:
- List with result object for each command
-
discard
public void discard()
Description copied from interface:RBatchDiscard batched commands and release allocated buffers used for parameters encoding.
-
discardAsync
public RFuture<Void> discardAsync()
Description copied from interface:RBatchDiscard batched commands and release allocated buffers used for parameters encoding.- Specified by:
discardAsyncin interfaceRBatch- Returns:
- void
-
getSetMultimap
public <K,V> RMultimapAsync<K,V> getSetMultimap(String name)
Description copied from interface:RBatchReturns Set based MultiMap instance by name.- Specified by:
getSetMultimapin interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- Multimap object
-
getSetMultimap
public <K,V> RMultimapAsync<K,V> getSetMultimap(String name, Codec codec)
Description copied from interface:RBatchReturns Set based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getSetMultimapin interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - provided codec- Returns:
- Multimap object
-
getListMultimap
public <K,V> RMultimapAsync<K,V> getListMultimap(String name)
Description copied from interface:RBatchReturns List based MultiMap instance by name.- Specified by:
getListMultimapin interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- ListMultimap object
-
getListMultimap
public <K,V> RMultimapAsync<K,V> getListMultimap(String name, Codec codec)
Description copied from interface:RBatchReturns List based MultiMap instance by name using provided codec for both map keys and values.- Specified by:
getListMultimapin interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- ListMultimap object
-
getGeo
public <V> RGeoAsync<V> getGeo(String name)
Description copied from interface:RBatchReturns geospatial items holder instance byname.
-
getGeo
public <V> RGeoAsync<V> getGeo(String name, Codec codec)
Description copied from interface:RBatchReturns geospatial items holder instance bynameusing provided codec for geospatial members.
-
getSetMultimapCache
public <K,V> RMultimapCacheAsync<K,V> getSetMultimapCache(String name)
Description copied from interface:RBatchReturns Set based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String).- Specified by:
getSetMultimapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- SetMultimapCache object
-
getSetMultimapCache
public <K,V> RMultimapCacheAsync<K,V> getSetMultimapCache(String name, Codec codec)
Description copied from interface:RBatchReturns Set based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String, Codec).- Specified by:
getSetMultimapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - provided codec- Returns:
- SetMultimapCache object
-
getListMultimapCache
public <K,V> RMultimapCacheAsync<K,V> getListMultimapCache(String name)
Description copied from interface:RBatchReturns List based Multimap instance by name. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String).- Specified by:
getListMultimapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- ListMultimapCache object
-
getListMultimapCache
public <K,V> RMultimapCacheAsync<K,V> getListMultimapCache(String name, Codec codec)
Description copied from interface:RBatchReturns List based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value.If eviction is not required then it's better to use regular map
RBatch.getSetMultimap(String, Codec).- Specified by:
getListMultimapCachein interfaceRBatch- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- ListMultimapCache object
-
getStream
public <K,V> RStreamAsync<K,V> getStream(String name)
Description copied from interface:RBatchReturns stream instance byname
-
getStream
public <K,V> RStreamAsync<K,V> getStream(String name, Codec codec)
Description copied from interface:RBatchReturns stream instance bynameusing providedcodecfor entries.
-
-