Class RedissonBatchReactive

java.lang.Object
org.redisson.reactive.RedissonBatchReactive
All Implemented Interfaces:
RBatchReactive

public class RedissonBatchReactive extends Object implements RBatchReactive
Author:
Nikita Koksharov
  • Constructor Details

  • Method Details

    • getStream

      public <K, V> RStreamReactive<K,V> getStream(String name)
      Description copied from interface: RBatchReactive
      Returns stream instance by name

      Requires Redis 5.0.0 and higher.

      Specified by:
      getStream in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - of stream
      Returns:
      RStream object
    • getStream

      public <K, V> RStreamReactive<K,V> getStream(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns stream instance by name using provided codec for entries.

      Requires Redis 5.0.0 and higher.

      Specified by:
      getStream in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of stream
      codec - - codec for entry
      Returns:
      RStream object
    • getBucket

      public <V> RBucketReactive<V> getBucket(String name)
      Description copied from interface: RBatchReactive
      Returns object holder by name
      Specified by:
      getBucket in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Bucket object
    • getBucket

      public <V> RBucketReactive<V> getBucket(String name, Codec codec)
      Specified by:
      getBucket in interface RBatchReactive
    • getJsonBucket

      public <V> RJsonBucketReactive<V> getJsonBucket(String name, JsonCodec codec)
      Description copied from interface: RBatchReactive
      Returns JSON data holder instance by name using provided codec.
      Specified by:
      getJsonBucket in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      JsonBucket object
      See Also:
    • getHyperLogLog

      public <V> RHyperLogLogReactive<V> getHyperLogLog(String name)
      Description copied from interface: RBatchReactive
      Returns HyperLogLog object by name
      Specified by:
      getHyperLogLog in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      HyperLogLog object
    • getHyperLogLog

      public <V> RHyperLogLogReactive<V> getHyperLogLog(String name, Codec codec)
      Specified by:
      getHyperLogLog in interface RBatchReactive
    • getList

      public <V> RListReactive<V> getList(String name)
      Description copied from interface: RBatchReactive
      Returns list instance by name.
      Specified by:
      getList in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      List object
    • getList

      public <V> RListReactive<V> getList(String name, Codec codec)
      Specified by:
      getList in interface RBatchReactive
    • getMap

      public <K, V> RMapReactive<K,V> getMap(String name)
      Description copied from interface: RBatchReactive
      Returns map instance by name.
      Specified by:
      getMap in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Map object
    • getMap

      public <K, V> RMapReactive<K,V> getMap(String name, Codec codec)
      Specified by:
      getMap in interface RBatchReactive
    • getMapCache

      public <K, V> RMapCacheReactive<K,V> getMapCache(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns map-based cache instance by name using provided codec for 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 RBatchReactive.getMap(String, Codec).

      Specified by:
      getMapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      MapCache object
    • getMapCache

      public <K, V> RMapCacheReactive<K,V> getMapCache(String name)
      Description copied from interface: RBatchReactive
      Returns map-based cache instance by name. Supports entry eviction with a given TTL value.

      If eviction is not required then it's better to use regular map RBatchReactive.getMap(String).

      Specified by:
      getMapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      MapCache object
    • getMapCacheNative

      public <K, V> RMapCacheNativeReactive<K,V> getMapCacheNative(String name)
      Description copied from interface: RBatchReactive
      Returns map instance by name. Supports entry eviction with a given TTL.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getMapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      Returns:
      Map object
    • getMapCacheNative

      public <K, V> RMapCacheNativeReactive<K,V> getMapCacheNative(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns map instance by name using provided codec for both map keys and values. Supports entry eviction with a given TTL.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getMapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      codec - codec for keys and values
      Returns:
      Map object
    • getListMultimapCacheNative

      public <K, V> RListMultimapCacheReactive<K,V> getListMultimapCacheNative(String name)
      Description copied from interface: RBatchReactive
      Returns List based Multimap instance by name. Supports key-entry eviction with a given TTL value. Stores insertion order and allows duplicates for values mapped to key.

      Uses Redis native commands for entry expiration and not a scheduled eviction task.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getListMultimapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      Returns:
      ListMultimapCache object
    • getListMultimapCacheNative

      public <K, V> RListMultimapCacheReactive<K,V> getListMultimapCacheNative(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns List based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value. Stores insertion order and allows duplicates for values mapped to key.

      Uses Redis native commands for entry expiration and not a scheduled eviction task.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getListMultimapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      codec - codec for keys and values
      Returns:
      ListMultimapCache object
    • getSetMultimapCacheNative

      public <K, V> RSetMultimapCacheReactive<K,V> getSetMultimapCacheNative(String name)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap instance by name. Supports key-entry eviction with a given TTL value. Doesn't allow duplications for values mapped to key.

      Uses Redis native commands for entry expiration and not a scheduled eviction task.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getSetMultimapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      Returns:
      SetMultimapCache object
    • getSetMultimapCacheNative

      public <K, V> RSetMultimapCacheReactive<K,V> getSetMultimapCacheNative(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap instance by name using provided codec for both map keys and values. Supports key-entry eviction with a given TTL value. Doesn't allow duplications for values mapped to key.

      Uses Redis native commands for entry expiration and not a scheduled eviction task.

      Requires Redis 7.4.0 and higher.

      Specified by:
      getSetMultimapCacheNative in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      codec - codec for keys and values
      Returns:
      SetMultimapCache object
    • getSet

      public <V> RSetReactive<V> getSet(String name)
      Description copied from interface: RBatchReactive
      Returns set instance by name.
      Specified by:
      getSet in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Set object
    • getSet

      public <V> RSetReactive<V> getSet(String name, Codec codec)
      Specified by:
      getSet in interface RBatchReactive
    • getTopic

      public RTopicReactive getTopic(String name)
      Description copied from interface: RBatchReactive
      Returns topic instance by name.
      Specified by:
      getTopic in interface RBatchReactive
      Parameters:
      name - - name of object
      Returns:
      Topic object
    • getTopic

      public RTopicReactive getTopic(String name, Codec codec)
      Specified by:
      getTopic in interface RBatchReactive
    • getShardedTopic

      public RShardedTopicReactive getShardedTopic(String name)
      Description copied from interface: RBatchReactive
      Returns Sharded Topic instance by name.

      Messages are delivered to message listeners connected to the same Topic.

      Specified by:
      getShardedTopic in interface RBatchReactive
      Parameters:
      name - - name of object
      Returns:
      Topic object
    • getShardedTopic

      public RShardedTopicReactive getShardedTopic(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns Sharded Topic instance by name using provided codec for messages.

      Messages are delivered to message listeners connected to the same Topic.

      Specified by:
      getShardedTopic in interface RBatchReactive
      Parameters:
      name - - name of object
      codec - - codec for message
      Returns:
      Topic object
    • getQueue

      public <V> RQueueReactive<V> getQueue(String name)
      Description copied from interface: RBatchReactive
      Returns queue instance by name.
      Specified by:
      getQueue in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Queue object
    • getQueue

      public <V> RQueueReactive<V> getQueue(String name, Codec codec)
      Specified by:
      getQueue in interface RBatchReactive
    • getBlockingQueue

      public <V> RBlockingQueueReactive<V> getBlockingQueue(String name)
      Description copied from interface: RBatchReactive
      Returns blocking queue instance by name.
      Specified by:
      getBlockingQueue in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      BlockingQueue object
    • getBlockingQueue

      public <V> RBlockingQueueReactive<V> getBlockingQueue(String name, Codec codec)
      Specified by:
      getBlockingQueue in interface RBatchReactive
    • getDeque

      public <V> RDequeReactive<V> getDeque(String name)
      Description copied from interface: RBatchReactive
      Returns deque instance by name.
      Specified by:
      getDeque in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Deque object
    • getDeque

      public <V> RDequeReactive<V> getDeque(String name, Codec codec)
      Specified by:
      getDeque in interface RBatchReactive
    • getAtomicLong

      public RAtomicLongReactive getAtomicLong(String name)
      Description copied from interface: RBatchReactive
      Returns "atomic long" instance by name.
      Specified by:
      getAtomicLong in interface RBatchReactive
      Parameters:
      name - - name of object
      Returns:
      AtomicLong object
    • getSetCache

      public <V> RSetCacheReactive<V> getSetCache(String name)
      Description copied from interface: RBatchReactive
      Returns set-based cache instance by name. 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 RBatchReactive.getSet(String, Codec).

      Specified by:
      getSetCache in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      SetCache object
    • getSetCache

      public <V> RSetCacheReactive<V> getSetCache(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns set-based cache instance by name using provided codec for 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 RBatchReactive.getSet(String, Codec).

      Specified by:
      getSetCache in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for values
      Returns:
      SetCache object
    • getScoredSortedSet

      public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name)
      Description copied from interface: RBatchReactive
      Returns Redis Sorted Set instance by name
      Specified by:
      getScoredSortedSet in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      ScoredSortedSet object
    • getScoredSortedSet

      public <V> RScoredSortedSetReactive<V> getScoredSortedSet(String name, Codec codec)
      Specified by:
      getScoredSortedSet in interface RBatchReactive
    • getLexSortedSet

      public RLexSortedSetReactive getLexSortedSet(String name)
      Description copied from interface: RBatchReactive
      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
      Specified by:
      getLexSortedSet in interface RBatchReactive
      Parameters:
      name - - name of object
      Returns:
      LexSortedSet object
    • getBitSet

      public RBitSetReactive getBitSet(String name)
      Description copied from interface: RBatchReactive
      Returns bitSet instance by name.
      Specified by:
      getBitSet in interface RBatchReactive
      Parameters:
      name - of bitSet
      Returns:
      BitSet object
    • getScript

      public RScriptReactive getScript()
      Description copied from interface: RBatchReactive
      Returns script operations object
      Specified by:
      getScript in interface RBatchReactive
      Returns:
      Script object
    • getScript

      public RScriptReactive getScript(Codec codec)
      Description copied from interface: RBatchReactive
      Returns script operations object using provided codec.
      Specified by:
      getScript in interface RBatchReactive
      Parameters:
      codec - - codec for params and result
      Returns:
      Script object
    • getFunction

      public RFunctionReactive getFunction()
      Description copied from interface: RBatchReactive
      Returns interface for Redis Function feature
      Specified by:
      getFunction in interface RBatchReactive
      Returns:
      function object
    • getFunction

      public RFunctionReactive getFunction(Codec codec)
      Description copied from interface: RBatchReactive
      Returns interface for Redis Function feature using provided codec
      Specified by:
      getFunction in interface RBatchReactive
      Parameters:
      codec - - codec for params and result
      Returns:
      function interface
    • getKeys

      public RKeysReactive getKeys()
      Description copied from interface: RBatchReactive
      Returns keys operations. Each of Redis/Redisson object associated with own key
      Specified by:
      getKeys in interface RBatchReactive
      Returns:
      Keys object
    • getSearch

      public RSearchReactive getSearch()
      Description copied from interface: RBatchReactive
      Returns API for RediSearch module
      Specified by:
      getSearch in interface RBatchReactive
      Returns:
      RSearchReactive object
    • getSearch

      public RSearchReactive getSearch(Codec codec)
      Description copied from interface: RBatchReactive
      Returns API for RediSearch module using defined codec for attribute values.
      Specified by:
      getSearch in interface RBatchReactive
      Parameters:
      codec - codec for entry
      Returns:
      RSearchReactive object
    • execute

      public reactor.core.publisher.Mono<BatchResult<?>> execute()
      Description copied from interface: RBatchReactive
      Executes all operations accumulated during Reactive methods invocations Reactivehronously. In cluster configurations operations grouped by slot ids so may be executed on different servers. Thus command execution order could be changed
      Specified by:
      execute in interface RBatchReactive
      Returns:
      List with result object for each command
    • discard

      public reactor.core.publisher.Mono<Void> discard()
      Description copied from interface: RBatchReactive
      Discard batched commands and release allocated buffers used for parameters encoding.
      Specified by:
      discard in interface RBatchReactive
      Returns:
      void
    • getGeo

      public <V> RGeoReactive<V> getGeo(String name)
      Description copied from interface: RBatchReactive
      Returns geospatial items holder instance by name.
      Specified by:
      getGeo in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Geo object
    • getGeo

      public <V> RGeoReactive<V> getGeo(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns geospatial items holder instance by name using provided codec for geospatial members.
      Specified by:
      getGeo in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for value
      Returns:
      Geo object
    • getSetMultimap

      public <K, V> RSetMultimapReactive<K,V> getSetMultimap(String name)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap instance by name.
      Specified by:
      getSetMultimap in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      SetMultimap object
    • getSetMultimap

      public <K, V> RSetMultimapReactive<K,V> getSetMultimap(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap instance by name using provided codec for both map keys and values.
      Specified by:
      getSetMultimap in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      SetMultimap object
    • getSetMultimapCache

      public <K, V> RSetMultimapCacheReactive<K,V> getSetMultimapCache(String name)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap cache instance by name. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular set multimap RBatchReactive.getSetMultimap(String).
      Specified by:
      getSetMultimapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      RSetMultimapCacheRx object
    • getSetMultimapCache

      public <K, V> RSetMultimapCacheReactive<K,V> getSetMultimapCache(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns Set based Multimap cache instance by name using provided codec for both map keys and values. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular set multimap RBatchReactive.getSetMultimap(String, Codec).
      Specified by:
      getSetMultimapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      RSetMultimapCacheRx object
    • getListMultimap

      public <K, V> RListMultimapReactive<K,V> getListMultimap(String name)
      Description copied from interface: RBatchReactive
      Returns List based MultiMap instance by name.
      Specified by:
      getListMultimap in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      ListMultimap object
    • getListMultimap

      public <K, V> RListMultimapReactive<K,V> getListMultimap(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns List based MultiMap instance by name using provided codec for both map keys and values.
      Specified by:
      getListMultimap in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      ListMultimap object
    • getListMultimapCache

      public <K, V> RListMultimapReactive<K,V> getListMultimapCache(String name)
      Description copied from interface: RBatchReactive
      Returns List based Multimap cache instance by name. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular list multimap RBatchReactive.getListMultimap(String).
      Specified by:
      getListMultimapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      RListMultimapCacheRx object
    • getListMultimapCache

      public <K, V> RListMultimapReactive<K,V> getListMultimapCache(String name, Codec codec)
      Description copied from interface: RBatchReactive
      Returns List based Multimap cache instance by name using provided codec for both map keys and values. Supports key eviction by specifying a time to live. If eviction is not required then it's better to use regular list multimap RBatchReactive.getListMultimap(String, Codec).
      Specified by:
      getListMultimapCache in interface RBatchReactive
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      RListMultimapCacheRx object
    • getAtomicDouble

      public RAtomicDoubleReactive getAtomicDouble(String name)
      Description copied from interface: RBatchReactive
      Returns atomicDouble instance by name.
      Specified by:
      getAtomicDouble in interface RBatchReactive
      Parameters:
      name - - name of object
      Returns:
      AtomicDouble object
    • getBlockingDeque

      public <V> RBlockingDequeReactive<V> getBlockingDeque(String name)
      Description copied from interface: RBatchReactive
      Returns blocking deque instance by name.
      Specified by:
      getBlockingDeque in interface RBatchReactive
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      BlockingDeque object
    • getBlockingDeque

      public <V> RBlockingDequeReactive<V> getBlockingDeque(String name, Codec codec)
      Specified by:
      getBlockingDeque in interface RBatchReactive