Interface RBatchRx

  • All Known Implementing Classes:
    RedissonBatchRx

    public interface RBatchRx
    RxJava2 interface for Redis pipeline feature.

    All method invocations on objects from this interface are batched to separate queue and could be executed later with execute() method.

    Author:
    Nikita Koksharov
    • Method Detail

      • getStream

        <K,​V> RStreamRx<K,​V> getStream​(String name)
        Returns stream instance by name

        Requires Redis 5.0.0 and higher.

        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - of stream
        Returns:
        RStream object
      • getStream

        <K,​V> RStreamRx<K,​V> getStream​(String name,
                                                   Codec codec)
        Returns stream instance by name using provided codec for entries.

        Requires Redis 5.0.0 and higher.

        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of stream
        codec - - codec for entry
        Returns:
        RStream object
      • getGeo

        <V> RGeoRx<V> getGeo​(String name)
        Returns geospatial items holder instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Geo object
      • getGeo

        <V> RGeoRx<V> getGeo​(String name,
                             Codec codec)
        Returns geospatial items holder instance by name using provided codec for geospatial members.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for value
        Returns:
        Geo object
      • getSetMultimap

        <K,​V> RSetMultimapRx<K,​V> getSetMultimap​(String name)
        Returns Set based Multimap instance by name.
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        SetMultimap object
      • getSetMultimap

        <K,​V> RSetMultimapRx<K,​V> getSetMultimap​(String name,
                                                             Codec codec)
        Returns Set based Multimap instance by name using provided codec for both map keys and values.
        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

        <K,​V> RSetMultimapCacheRx<K,​V> getSetMultimapCache​(String name)
        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 getSetMultimap(String).
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        RSetMultimapCacheRx object
      • getSetMultimapCache

        <K,​V> RSetMultimapCacheRx<K,​V> getSetMultimapCache​(String name,
                                                                       Codec codec)
        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 getSetMultimap(String, Codec).
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for keys and values
        Returns:
        RSetMultimapCacheRx object
      • getSetCache

        <V> RSetCacheRx<V> getSetCache​(String name)
        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 getSet(String, Codec).

        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        SetCache object
      • getSetCache

        <V> RSetCacheRx<V> getSetCache​(String name,
                                       Codec codec)
        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 getSet(String, Codec).

        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        SetCache object
      • getMapCache

        <K,​V> RMapCacheRx<K,​V> getMapCache​(String name,
                                                       Codec codec)
        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 getMap(String, Codec).

        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

        <K,​V> RMapCacheRx<K,​V> getMapCache​(String name)
        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 getMap(String).

        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        MapCache object
      • getBucket

        <V> RBucketRx<V> getBucket​(String name)
        Returns object holder by name
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Bucket object
      • getHyperLogLog

        <V> RHyperLogLogRx<V> getHyperLogLog​(String name)
        Returns HyperLogLog object by name
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        HyperLogLog object
      • getList

        <V> RListRx<V> getList​(String name)
        Returns list instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        List object
      • getListMultimap

        <K,​V> RListMultimapRx<K,​V> getListMultimap​(String name)
        Returns List based MultiMap instance by name.
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        ListMultimap object
      • getListMultimap

        <K,​V> RListMultimapRx<K,​V> getListMultimap​(String name,
                                                               Codec codec)
        Returns List based MultiMap instance by name using provided codec for both map keys and values.
        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

        <K,​V> RListMultimapCacheRx<K,​V> getListMultimapCache​(String name)
        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 getListMultimap(String).
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        RListMultimapCacheRx object
      • getListMultimapCache

        <K,​V> RListMultimapCacheRx<K,​V> getListMultimapCache​(String name,
                                                                         Codec codec)
        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 getListMultimap(String, Codec).
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for keys and values
        Returns:
        RListMultimapCacheRx object
      • getMap

        <K,​V> RMapRx<K,​V> getMap​(String name)
        Returns map instance by name.
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Map object
      • getSet

        <V> RSetRx<V> getSet​(String name)
        Returns set instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Set object
      • getTopic

        RTopicRx getTopic​(String name)
        Returns topic instance by name.
        Parameters:
        name - - name of object
        Returns:
        Topic object
      • getQueue

        <V> RQueueRx<V> getQueue​(String name)
        Returns queue instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Queue object
      • getBlockingQueue

        <V> RBlockingQueueRx<V> getBlockingQueue​(String name)
        Returns blocking queue instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        BlockingQueue object
      • getBlockingDeque

        <V> RBlockingDequeRx<V> getBlockingDeque​(String name)
        Returns blocking deque instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        BlockingDeque object
      • getDeque

        <V> RDequeRx<V> getDeque​(String name)
        Returns deque instance by name.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        Deque object
      • getAtomicLong

        RAtomicLongRx getAtomicLong​(String name)
        Returns "atomic long" instance by name.
        Parameters:
        name - - name of object
        Returns:
        AtomicLong object
      • getAtomicDouble

        RAtomicDoubleRx getAtomicDouble​(String name)
        Returns atomicDouble instance by name.
        Parameters:
        name - - name of object
        Returns:
        AtomicDouble object
      • getScoredSortedSet

        <V> RScoredSortedSetRx<V> getScoredSortedSet​(String name)
        Returns Redis Sorted Set instance by name
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        Returns:
        ScoredSortedSet object
      • getLexSortedSet

        RLexSortedSetRx getLexSortedSet​(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
        Parameters:
        name - - name of object
        Returns:
        LexSortedSet object
      • getBitSet

        RBitSetRx getBitSet​(String name)
        Returns bitSet instance by name.
        Parameters:
        name - of bitSet
        Returns:
        BitSet object
      • getScript

        RScriptRx getScript()
        Returns script operations object
        Returns:
        Script object
      • getScript

        RScriptRx getScript​(Codec codec)
        Returns script operations object using provided codec.
        Parameters:
        codec - - codec for params and result
        Returns:
        Script object
      • getKeys

        RKeysRx getKeys()
        Returns keys operations. Each of Redis/Redisson object associated with own key
        Returns:
        Keys object
      • execute

        io.reactivex.rxjava3.core.Maybe<BatchResult<?>> execute()
        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
        Returns:
        List with result object for each command
      • discard

        io.reactivex.rxjava3.core.Completable discard()
        Discard batched commands and release allocated buffers used for parameters encoding.
        Returns:
        void