Interface RedissonReactiveClient

  • All Known Implementing Classes:
    RedissonReactive

    public interface RedissonReactiveClient
    Main Redisson interface for access to all redisson objects with reactive interface.
    Author:
    Nikita Koksharov
    • Method Detail

      • getStream

        <K,​V> RStreamReactive<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> RStreamReactive<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> RGeoReactive<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> RGeoReactive<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
      • getRateLimiter

        RRateLimiterReactive getRateLimiter​(String name)
        Returns rate limiter instance by name
        Parameters:
        name - of rate limiter
        Returns:
        RateLimiter object
      • getSemaphore

        RSemaphoreReactive getSemaphore​(String name)
        Returns semaphore instance by name
        Parameters:
        name - - name of object
        Returns:
        Semaphore object
      • getPermitExpirableSemaphore

        RPermitExpirableSemaphoreReactive getPermitExpirableSemaphore​(String name)
        Returns semaphore instance by name. Supports lease time parameter for each acquired permit.
        Parameters:
        name - - name of object
        Returns:
        PermitExpirableSemaphore object
      • getReadWriteLock

        RReadWriteLockReactive getReadWriteLock​(String name)
        Returns readWriteLock instance by name.
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getFairLock

        RLockReactive getFairLock​(String name)
        Returns lock instance by name.

        Implements a fair locking so it guarantees an acquire order by threads.

        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getLock

        RLockReactive getLock​(String name)
        Returns lock instance by name.

        Implements a non-fair locking so doesn't guarantee an acquire order by threads.

        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getSetCache

        <V> RSetCacheReactive<V> getSetCache​(String name)
        Returns set-based cache instance by name. 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 values
        Parameters:
        name - - name of object
        Returns:
        SetCache object
      • getSetCache

        <V> RSetCacheReactive<V> getSetCache​(String name,
                                             Codec codec)
        Returns set-based cache instance by name. 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 values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        SetCache object
      • getMapCache

        <K,​V> RMapCacheReactive<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 MaxIdleTime and TTL settings.

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

        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        MapCache object
      • getMapCache

        <K,​V> RMapCacheReactive<K,​V> getMapCache​(String name,
                                                             Codec codec,
                                                             MapOptions<K,​V> options)
        Returns map-based cache instance by name using provided codec for both cache keys and values. Supports entry eviction with a given MaxIdleTime and TTL settings.

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

        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - object name
        codec - - codec for keys and values
        options - - map options
        Returns:
        MapCache object
      • getMapCache

        <K,​V> RMapCacheReactive<K,​V> getMapCache​(String name)
        Returns map-based cache instance by name. Supports entry eviction with a given MaxIdleTime and TTL settings.

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

        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        MapCache object
      • getMapCache

        <K,​V> RMapCacheReactive<K,​V> getMapCache​(String name,
                                                             MapOptions<K,​V> options)
        Returns map-based cache instance by name. Supports entry eviction with a given MaxIdleTime and TTL settings.

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

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

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

        <V> RBucketReactive<V> getBucket​(String name,
                                         Codec codec)
        Returns object holder instance by name using provided codec for object.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for value
        Returns:
        Bucket object
      • findBuckets

        <V> List<RBucketReactive<V>> findBuckets​(String pattern)
        Returns a list of object holder instances by a key pattern
        Type Parameters:
        V - type of value
        Parameters:
        pattern - - pattern for name of buckets
        Returns:
        list of buckets
      • getHyperLogLog

        <V> RHyperLogLogReactive<V> getHyperLogLog​(String name)
        Returns HyperLogLog instance by name.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        HyperLogLog object
      • getHyperLogLog

        <V> RHyperLogLogReactive<V> getHyperLogLog​(String name,
                                                   Codec codec)
        Returns HyperLogLog instance by name using provided codec for hll objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec of values
        Returns:
        HyperLogLog object
      • getList

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

        <V> RListReactive<V> getList​(String name,
                                     Codec codec)
        Returns list instance by name using provided codec for list objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        List object
      • getListMultimap

        <K,​V> RListMultimapReactive<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> RListMultimapReactive<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:
        RListMultimapReactive object
      • getSetMultimap

        <K,​V> RSetMultimapReactive<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> RSetMultimapReactive<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
      • getMap

        <K,​V> RMapReactive<K,​V> getMap​(String name)
        Returns map instance by name.
        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        Map object
      • getMap

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

        <K,​V> RMapReactive<K,​V> getMap​(String name,
                                                   Codec codec)
        Returns map instance by name using provided codec for both map keys and values.
        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for keys and values
        Returns:
        Map object
      • getMap

        <K,​V> RMapReactive<K,​V> getMap​(String name,
                                                   Codec codec,
                                                   MapOptions<K,​V> options)
        Returns map 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
        options - - map options
        Returns:
        Map object
      • getSet

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

        <V> RSetReactive<V> getSet​(String name,
                                   Codec codec)
        Returns set instance by name using provided codec for set objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of set
        codec - - codec for values
        Returns:
        Set object
      • getScoredSortedSet

        <V> RScoredSortedSetReactive<V> getScoredSortedSet​(String name)
        Returns Redis Sorted Set instance by name. This sorted set sorts objects by object score.
        Type Parameters:
        V - type of values
        Parameters:
        name - of scored sorted set
        Returns:
        ScoredSortedSet object
      • getScoredSortedSet

        <V> RScoredSortedSetReactive<V> getScoredSortedSet​(String name,
                                                           Codec codec)
        Returns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of scored sorted set
        codec - - codec for values
        Returns:
        ScoredSortedSet object
      • getLexSortedSet

        RLexSortedSetReactive 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
      • getTopic

        <M> RTopicReactive<M> getTopic​(String name)
        Returns topic instance by name.
        Type Parameters:
        M - type of message
        Parameters:
        name - - name of object
        Returns:
        Topic object
      • getTopic

        <M> RTopicReactive<M> getTopic​(String name,
                                       Codec codec)
        Returns topic instance by name using provided codec for messages.
        Type Parameters:
        M - type of message
        Parameters:
        name - - name of object
        codec - - codec for message
        Returns:
        Topic object
      • getPatternTopic

        <M> RPatternTopicReactive<M> getPatternTopic​(String pattern)
        Returns topic instance satisfies by pattern name. Supported glob-style patterns: 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
        Type Parameters:
        M - type of message
        Parameters:
        pattern - of the topic
        Returns:
        PatternTopic object
      • getPatternTopic

        <M> RPatternTopicReactive<M> getPatternTopic​(String pattern,
                                                     Codec codec)
        Returns topic instance satisfies by pattern name using provided codec for messages. Supported glob-style patterns: 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
        Type Parameters:
        M - type of message
        Parameters:
        pattern - of the topic
        codec - - codec for message
        Returns:
        PatternTopic object
      • getQueue

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

        <V> RQueueReactive<V> getQueue​(String name,
                                       Codec codec)
        Returns queue instance by name using provided codec for queue objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        Queue object
      • getBlockingQueue

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

        <V> RBlockingQueueReactive<V> getBlockingQueue​(String name,
                                                       Codec codec)
        Returns blocking queue instance by name using provided codec for queue objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - code for values
        Returns:
        BlockingQueue object
      • getBlockingDeque

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

        <V> RBlockingDequeReactive<V> getBlockingDeque​(String name,
                                                       Codec codec)
        Returns unbounded blocking deque instance by name using provided codec for deque objects.
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - deque objects codec
        Returns:
        BlockingDeque object
      • getDeque

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

        <V> RDequeReactive<V> getDeque​(String name,
                                       Codec codec)
        Returns deque instance by name using provided codec for deque objects.
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - coded for values
        Returns:
        Deque object
      • getAtomicLong

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

        RAtomicDoubleReactive getAtomicDouble​(String name)
        Returns "atomic double" instance by name.
        Parameters:
        name - of the "atomic double"
        Returns:
        AtomicLong object
      • getBitSet

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

        RScriptReactive getScript()
        Returns script operations object
        Returns:
        Script object
      • createTransaction

        RTransactionReactive createTransaction​(TransactionOptions options)
        Creates transaction with READ_COMMITTED isolation level.
        Parameters:
        options - - transaction configuration
        Returns:
        Transaction object
      • getKeys

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

        void shutdown()
        Shuts down Redisson instance NOT Redis server
      • getConfig

        Config getConfig()
        Allows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.
        Returns:
        Config object
      • getCodecProvider

        ReferenceCodecProvider getCodecProvider()
        Returns the CodecProvider instance
        Returns:
        CodecProvider object
      • getNodesGroup

        NodesGroup<Node> getNodesGroup()
        Get Redis nodes group for server operations
        Returns:
        NodesGroup object
      • getClusterNodesGroup

        NodesGroup<ClusterNode> getClusterNodesGroup()
        Get Redis cluster nodes group for server operations
        Returns:
        NodesGroup object
      • isShutdown

        boolean isShutdown()
        Returns true if this Redisson instance has been shut down.
        Returns:
        true if this Redisson instance has been shut down otherwise false
      • isShuttingDown

        boolean isShuttingDown()
        Returns true if this Redisson instance was started to be shutdown or was shutdown isShutdown() already.
        Returns:
        true if this Redisson instance was started to be shutdown or was shutdown isShutdown() already otherwise false