Package org.redisson

Class RedissonReactive

  • All Implemented Interfaces:
    RedissonReactiveClient

    public class RedissonReactive
    extends 
    implements RedissonReactiveClient
    Main infrastructure class allows to get access to all Redisson objects on top of Redis server.
    Author:
    Nikita Koksharov
    • Method Detail

      • getStream

        public <K,​V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns stream instance by name

        Requires Redis 5.0.0 and higher.

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

        public <K,​V>  name,
                                                                Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns stream instance by name using provided codec for entries.

        Requires Redis 5.0.0 and higher.

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

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

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

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns Lock instance by name.

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

        To increase reliability during failover, all operations wait for propagation to all Redis slaves.

        Specified by:
        getFairLock in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getReadWriteLock

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns ReadWriteLock instance by name.

        To increase reliability during failover, all operations wait for propagation to all Redis slaves.

        Specified by:
        getReadWriteLock in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getLock

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns Lock instance by name.

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

        To increase reliability during failover, all operations wait for propagation to all Redis slaves.

        Specified by:
        getLock in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getSpinLock

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns Spin lock instance by name.

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

        Lock doesn't use a pub/sub mechanism

        Specified by:
        getSpinLock in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getSpinLock

        public  name,
                                         LockOptions.BackOff backOff)
        Description copied from interface: RedissonReactiveClient
        Returns Spin lock instance by name with specified back off options.

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

        Lock doesn't use a pub/sub mechanism

        Specified by:
        getSpinLock in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        Lock object
      • getMapCache

        public <K,​V>  name,
                                                                    Codec codec)
        Description copied from interface: RedissonReactiveClient
        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 RedissonReactiveClient.getMap(String, Codec).

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

        public <K,​V>  name)
        Description copied from interface: RedissonReactiveClient
        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 RedissonReactiveClient.getMap(String).

        Specified by:
        getMapCache in interface RedissonReactiveClient
        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        MapCache object
      • getBucket

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

        public <V>  name,
                                                Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns object holder instance by name using provided codec for object.
        Specified by:
        getBucket in interface RedissonReactiveClient
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - codec for value
        Returns:
        Bucket object
      • findBuckets

        public <V> < pattern)
        Description copied from interface: RedissonReactiveClient
        Returns a list of object holder instances by a key pattern
        Specified by:
        findBuckets in interface RedissonReactiveClient
        Type Parameters:
        V - type of value
        Parameters:
        pattern - - pattern for name of buckets
        Returns:
        list of buckets
      • getHyperLogLog

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns HyperLogLog instance by name.
        Specified by:
        getHyperLogLog in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        HyperLogLog object
      • getHyperLogLog

        public <V>  name,
                                                          Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns HyperLogLog instance by name using provided codec for hll objects.
        Specified by:
        getHyperLogLog in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec of values
        Returns:
        HyperLogLog object
      • getList

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns list instance by name.
        Specified by:
        getList in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        List object
      • getList

        public <V>  name,
                                            Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns list instance by name using provided codec for list objects.
        Specified by:
        getList in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        List object
      • getListMultimap

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

        public <K,​V>  name,
                                                                            Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns List based Multimap instance by name using provided codec for both map keys and values.
        Specified by:
        getListMultimap in interface RedissonReactiveClient
        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

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

        public <K,​V>  name,
                                                                          Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns Set based Multimap instance by name using provided codec for both map keys and values.
        Specified by:
        getSetMultimap in interface RedissonReactiveClient
        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

        public <K,​V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns map instance by name.
        Specified by:
        getMap in interface RedissonReactiveClient
        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        Map object
      • getMap

        public <K,​V>  name,
                                                          Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns map instance by name using provided codec for both map keys and values.
        Specified by:
        getMap in interface RedissonReactiveClient
        Type Parameters:
        K - type of keys
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for keys and values
        Returns:
        Map object
      • getSet

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns set instance by name.
        Specified by:
        getSet in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        Set object
      • getSet

        public <V>  name,
                                          Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns set instance by name using provided codec for set objects.
        Specified by:
        getSet in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of set
        codec - - codec for values
        Returns:
        Set object
      • getScoredSortedSet

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns Redis Sorted Set instance by name. This sorted set sorts objects by object score.
        Specified by:
        getScoredSortedSet in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - of scored sorted set
        Returns:
        ScoredSortedSet object
      • getScoredSortedSet

        public <V>  name,
                                                                  Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.
        Specified by:
        getScoredSortedSet in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of scored sorted set
        codec - - codec for values
        Returns:
        ScoredSortedSet object
      • getLexSortedSet

        public  name)
        Description copied from interface: RedissonReactiveClient
        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 RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        LexSortedSet object
      • getTopic

        public  name,
                                       Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns topic instance by name using provided codec for messages.
        Specified by:
        getTopic in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        codec - - codec for message
        Returns:
        Topic object
      • getReliableTopic

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns reliable topic instance by name.

        Dedicated Redis connection is allocated per instance (subscriber) of this object. Messages are delivered to all listeners attached to the same Redis setup.

        Requires Redis 5.0.0 and higher.

        Specified by:
        getReliableTopic in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        Returns:
        ReliableTopic object
      • getReliableTopic

        public  name,
                                                       Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns reliable topic instance by name using provided codec for messages.

        Dedicated Redis connection is allocated per instance (subscriber) of this object. Messages are delivered to all listeners attached to the same Redis setup.

        Requires Redis 5.0.0 and higher.

        Specified by:
        getReliableTopic in interface RedissonReactiveClient
        Parameters:
        name - - name of object
        codec - - codec for message
        Returns:
        ReliableTopic object
      • getPatternTopic

        public  pattern)
        Description copied from interface: RedissonReactiveClient
        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
        Specified by:
        getPatternTopic in interface RedissonReactiveClient
        Parameters:
        pattern - of the topic
        Returns:
        PatternTopic object
      • getPatternTopic

        public  pattern,
                                                     Codec codec)
        Description copied from interface: RedissonReactiveClient
        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
        Specified by:
        getPatternTopic in interface RedissonReactiveClient
        Parameters:
        pattern - of the topic
        codec - - codec for message
        Returns:
        PatternTopic object
      • getQueue

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns queue instance by name.
        Specified by:
        getQueue in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        Queue object
      • getQueue

        public <V>  name,
                                              Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns queue instance by name using provided codec for queue objects.
        Specified by:
        getQueue in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        Queue object
      • getRingBuffer

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns RingBuffer based queue.
        Specified by:
        getRingBuffer in interface RedissonReactiveClient
        Type Parameters:
        V - value type
        Parameters:
        name - - name of object
        Returns:
        RingBuffer object
      • getRingBuffer

        public <V>  name,
                                                        Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns RingBuffer based queue.
        Specified by:
        getRingBuffer in interface RedissonReactiveClient
        Type Parameters:
        V - value type
        Parameters:
        name - - name of object
        codec - - codec for values
        Returns:
        RingBuffer object
      • getBlockingQueue

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

        public <V>  name,
                                                              Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns blocking queue instance by name using provided codec for queue objects.
        Specified by:
        getBlockingQueue in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - code for values
        Returns:
        BlockingQueue object
      • getDeque

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns deque instance by name.
        Specified by:
        getDeque in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        Deque object
      • getDeque

        public <V>  name,
                                              Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns deque instance by name using provided codec for deque objects.
        Specified by:
        getDeque in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - coded for values
        Returns:
        Deque object
      • getTimeSeries

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns time-series instance by name
        Specified by:
        getTimeSeries in interface RedissonReactiveClient
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of instance
        Returns:
        RTimeSeries object
      • getTimeSeries

        public <V>  name,
                                                        Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns time-series instance by name using provided codec for values.
        Specified by:
        getTimeSeries in interface RedissonReactiveClient
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of instance
        codec - - codec for values
        Returns:
        RTimeSeries object
      • getRemoteService

        public  name)
        Description copied from interface: RedissonReactiveClient
        Returns object for remote operations prefixed with the specified name
        Specified by:
        getRemoteService in interface RedissonReactiveClient
        Parameters:
        name - - the name used as the Redis key prefix for the services
        Returns:
        RemoteService object
      • getRemoteService

        public RRemoteService getRemoteService​(Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns object for remote operations prefixed with the default name (redisson_remote_service) and uses provided codec for method arguments and result.
        Specified by:
        getRemoteService in interface RedissonReactiveClient
        Parameters:
        codec - - codec for response and request
        Returns:
        RemoteService object
      • getRemoteService

        public  name,
                                               Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns object for remote operations prefixed with the specified name and uses provided codec for method arguments and result.
        Specified by:
        getRemoteService in interface RedissonReactiveClient
        Parameters:
        name - - the name used as the Redis key prefix for the services
        codec - - codec for response and request
        Returns:
        RemoteService object
      • getConfig

        public Config getConfig()
        Description copied from interface: RedissonReactiveClient
        Allows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.
        Specified by:
        getConfig in interface RedissonReactiveClient
        Returns:
        Config object
      • isShutdown

        public boolean isShutdown()
        Description copied from interface: RedissonReactiveClient
        Returns true if this Redisson instance has been shut down.
        Specified by:
        isShutdown in interface RedissonReactiveClient
        Returns:
        true if this Redisson instance has been shut down otherwise false
      • getMapCache

        public <K,​V>  name,
                                                                    Codec codec,
                                                                    MapOptions<K,​V> options)
        Description copied from interface: RedissonReactiveClient
        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 RedissonReactiveClient.getMap(String, Codec, MapOptions).

        Specified by:
        getMapCache in interface RedissonReactiveClient
        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
      • getMap

        public <K,​V>  name,
                                                          MapOptions<K,​V> options)
        Description copied from interface: RedissonReactiveClient
        Returns map instance by name.
        Specified by:
        getMap in interface RedissonReactiveClient
        Type Parameters:
        K - type of key
        V - type of value
        Parameters:
        name - - name of object
        options - - map options
        Returns:
        Map object
      • getMap

        public <K,​V>  name,
                                                          Codec codec,
                                                          MapOptions<K,​V> options)
        Description copied from interface: RedissonReactiveClient
        Returns map instance by name using provided codec for both map keys and values.
        Specified by:
        getMap in interface RedissonReactiveClient
        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
      • getBlockingDeque

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

        public <V>  name,
                                                              Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns unbounded blocking deque instance by name using provided codec for deque objects.
        Specified by:
        getBlockingDeque in interface RedissonReactiveClient
        Type Parameters:
        V - type of value
        Parameters:
        name - - name of object
        codec - - deque objects codec
        Returns:
        BlockingDeque object
      • getTransferQueue

        public <V>  name)
        Description copied from interface: RedissonReactiveClient
        Returns transfer queue instance by name.
        Specified by:
        getTransferQueue in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        Returns:
        TransferQueue object
      • getTransferQueue

        public <V>  name,
                                                              Codec codec)
        Description copied from interface: RedissonReactiveClient
        Returns transfer queue instance by name using provided codec for queue objects.
        Specified by:
        getTransferQueue in interface RedissonReactiveClient
        Type Parameters:
        V - type of values
        Parameters:
        name - - name of object
        codec - - code for values
        Returns:
        TransferQueue object