Package org.redisson

Class RedissonStream<K,​V>

    • Method Detail

      • checkKey

        protected void checkKey​( key)
      • checkValue

        protected void checkValue​( value)
      • createGroup

        public void createGroup​( groupName)
        Description copied from interface: RStream
        Creates consumer group by name. Only new messages will be available for consumers of this group.
        Specified by:
        createGroup in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
      • createGroupAsync

        public > createGroupAsync​( groupName)
        Description copied from interface: RStreamAsync
        Creates consumer group by name.
        Specified by:
        createGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        void
      • createGroup

        public void createGroup​( groupName,
                                StreamMessageId id)
        Description copied from interface: RStream
        Creates consumer group by name and Stream Message ID. Only new messages after defined stream id will be available for consumers of this group.

        StreamMessageId.NEWEST is used for messages arrived since the moment of group creation StreamMessageId.ALL is used for all messages added before and after the moment of group creation

        Specified by:
        createGroup in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        id - - Stream Message ID
      • createGroupAsync

        public > createGroupAsync​( groupName,
                                              StreamMessageId id)
        Description copied from interface: RStreamAsync
        Creates consumer group by name and stream id. Only new messages after defined stream id will be available for consumers of this group.

        StreamMessageId.NEWEST is used for messages arrived since the moment of group creating

        Specified by:
        createGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        id - - stream id
        Returns:
        void
      • ackAsync

        public > ackAsync​( groupName,
                                      StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Marks pending messages by group name and stream ids as correctly processed.
        Specified by:
        ackAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        ids - - stream ids
        Returns:
        marked messages amount
      • ack

        public long ack​( groupName,
                        StreamMessageId... id)
        Description copied from interface: RStream
        Marks pending messages by group name and stream ids as correctly processed.
        Specified by:
        ack in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        id - - Stream Message IDs
        Returns:
        marked messages amount
      • getPendingInfoAsync

        public  groupName)
        Description copied from interface: RStreamAsync
        Returns common info about pending messages by group name.
        Specified by:
        getPendingInfoAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        result object
      • getPendingInfo

        public  groupName)
        Description copied from interface: RStream
        Returns common info about pending messages by group name.
        Specified by:
        getPendingInfo in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        result object
      • fastClaim

        public < groupName,
                                                consumerName,
                                               long idleTime,
                                                idleTimeUnit,
                                               StreamMessageId... ids)
        Description copied from interface: RStream
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
        Specified by:
        fastClaim in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        ids - - Stream Message IDs
        Returns:
        list of Stream Message IDs
      • fastClaimAsync

        public < groupName,
                                                              consumerName,
                                                             long idleTime,
                                                              idleTimeUnit,
                                                             StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
        Specified by:
        fastClaimAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        ids - - Stream Message IDs
        Returns:
        list of Stream Message IDs
      • autoClaim

        public  groupName,
                                                     consumerName,
                                                    long idleTime,
                                                     idleTimeUnit,
                                                    StreamMessageId startId,
                                                    int count)
        Description copied from interface: RStream
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.
        Specified by:
        autoClaim in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        startId - - start Stream Message ID
        Returns:
        stream data mapped by Stream ID
      • autoClaimAsync

        public  groupName,
                                                                   consumerName,
                                                                  long idleTime,
                                                                   idleTimeUnit,
                                                                  StreamMessageId startId,
                                                                  int count)
        Description copied from interface: RStreamAsync
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.
        Specified by:
        autoClaimAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        startId - - start Stream Message ID
        Returns:
        stream data mapped by Stream ID
      • fastAutoClaim

        public  groupName,
                                                  consumerName,
                                                 long idleTime,
                                                  idleTimeUnit,
                                                 StreamMessageId startId,
                                                 int count)
        Description copied from interface: RStream
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.
        Specified by:
        fastAutoClaim in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        startId - - start Stream Message ID
        Returns:
        list of Stream Message IDs
      • readGroup

        public <,​<< groupName,
                                                                                      consumerName,
                                                                                     StreamMultiReadGroupArgs args)
        Description copied from interface: RStream
        Read stream data from consumer group and multiple streams including current.

        Usage examples:

         Map result = stream.read("group1", "consumer1",  StreamMultiReadGroupArgs.greaterThan(id, "stream2", id2));
         
         Map result = stream.read("group1", "consumer1", StreamMultiReadGroupArgs.greaterThan(id, "stream2", id2)
                                                                                  .count(100)
                                                                                  .timeout(Duration.ofSeconds(5))));
         
        Specified by:
        readGroup in interface RStream<K,​V>
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • readGroup

        public << groupName,
                                                                    consumerName,
                                                                   StreamReadGroupArgs args)
        Description copied from interface: RStream
        Read stream data from consumer group and current stream only.

        Usage examples:

         Map result = stream.read("group1", "consumer1",  StreamReadGroupArgs.greaterThan(id));
         
         Map result = stream.read("group1", "consumer1", StreamReadGroupArgs.greaterThan(id)
                                                                                  .count(100)
                                                                                  .timeout(Duration.ofSeconds(5))));
         
        Specified by:
        readGroup in interface RStream<K,​V>
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   StreamMultiReadGroupArgs args)
        Description copied from interface: RStreamAsync
        Read stream data from consumer group and multiple streams including current.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • readGroupAsync

        public << groupName,
                                                                                  consumerName,
                                                                                 StreamReadGroupArgs args)
        Description copied from interface: RStreamAsync
        Read stream data from consumer group and current stream only.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • fastAutoClaimAsync

        public  groupName,
                                                                consumerName,
                                                               long idleTime,
                                                                idleTimeUnit,
                                                               StreamMessageId startId,
                                                               int count)
        Description copied from interface: RStreamAsync
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.
        Specified by:
        fastAutoClaimAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        startId - - start Stream Message ID
        Returns:
        list of Stream Message IDs
      • claimAsync

        public << groupName,
                                                                              consumerName,
                                                                             long idleTime,
                                                                              idleTimeUnit,
                                                                             StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
        Specified by:
        claimAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        ids - - Stream Message IDs
        Returns:
        stream data mapped by Stream ID
      • claim

        public << groupName,
                                                                consumerName,
                                                               long idleTime,
                                                                idleTimeUnit,
                                                               StreamMessageId... ids)
        Description copied from interface: RStream
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
        Specified by:
        claim in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        ids - - Stream Message IDs
        Returns:
        stream data mapped by Stream Message ID
      • readGroupAsync

        public << groupName,
                                                                                  consumerName,
                                                                                 StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName and specified collection of Stream IDs.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        ids - - collection of Stream IDs
        Returns:
        stream data mapped by Stream ID
      • readGroupAsync

        public << groupName,
                                                                                  consumerName,
                                                                                 int count,
                                                                                 StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName and specified collection of Stream IDs.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        ids - - collection of Stream IDs
        Returns:
        stream data mapped by Stream ID
      • readGroupAsync

        public << groupName,
                                                                                  consumerName,
                                                                                 long timeout,
                                                                                  unit,
                                                                                 StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName and specified collection of Stream IDs. Wait for stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        ids - - collection of Stream IDs
        Returns:
        stream data mapped by Stream ID
      • readGroupAsync

        public << groupName,
                                                                                  consumerName,
                                                                                 int count,
                                                                                 long timeout,
                                                                                  unit,
                                                                                 StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName and specified collection of Stream IDs. Wait for stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        ids - - collection of Stream IDs
        Returns:
        stream data mapped by Stream ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   StreamMessageId id,
                                                                                                   <,​StreamMessageId> keyToId)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        id - - starting message id for this stream
        keyToId - - Stream Message ID mapped by stream name
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   int count,
                                                                                                   StreamMessageId id,
                                                                                                   <,​StreamMessageId> keyToId)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        id - - starting message id for this stream
        keyToId - - Stream Message ID mapped by stream name
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   int count,
                                                                                                   long timeout,
                                                                                                    unit,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   int count,
                                                                                                   long timeout,
                                                                                                    unit,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2,
                                                                                                    key3,
                                                                                                   StreamMessageId id3)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        key3 - - name of third stream
        id3 - - starting message id for third stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   long timeout,
                                                                                                    unit,
                                                                                                   StreamMessageId id,
                                                                                                   <,​StreamMessageId> keyToId)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        id - - starting message id for this stream
        keyToId - - Stream Message ID mapped by stream name
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2,
                                                                                                    key3,
                                                                                                   StreamMessageId id3)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        key3 - - name of third stream
        id3 - - starting message id for third stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   int count,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   int count,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2,
                                                                                                    key3,
                                                                                                   StreamMessageId id3)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        count - - stream data size limit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        key3 - - name of third stream
        id3 - - starting message id for third stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   long timeout,
                                                                                                    unit,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroupAsync

        public <,​<< groupName,
                                                                                                    consumerName,
                                                                                                   long timeout,
                                                                                                    unit,
                                                                                                   StreamMessageId id,
                                                                                                    key2,
                                                                                                   StreamMessageId id2,
                                                                                                    key3,
                                                                                                   StreamMessageId id3)
        Description copied from interface: RStreamAsync
        Read stream data from groupName by consumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specified timeout interval.
        Specified by:
        readGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        timeout - - time interval to wait for stream data availability
        unit - - time interval unit
        id - - starting message id for this stream
        key2 - - name of second stream
        id2 - - starting message id for second stream
        key3 - - name of third stream
        id3 - - starting message id for third stream
        Returns:
        stream data mapped by key and Stream Message ID
      • readGroup

        public << groupName,
                                                                    consumerName,
                                                                   int count,
                                                                   long timeout,
                                                                    unit,
                                                                   StreamMessageId... ids)
        Specified by:
        readGroup in interface RStream<K,​V>
      • addAll

        public <K,​V> entries)
        Specified by:
        addAll in interface RStream<K,​V>
      • addAll

        public <K,​V> entries,
                                      int trimLen,
                                      boolean trimStrict)
        Specified by:
        addAll in interface RStream<K,​V>
      • addAllAsync

        public <K,​V> entries,
                                                    int trimLen,
                                                    boolean trimStrict)
        Specified by:
        addAllAsync in interface RStreamAsync<K,​V>
      • size

        public long size()
        Description copied from interface: RStream
        Returns number of entries in stream
        Specified by:
        size in interface RStream<K,​V>
        Returns:
        size of stream
      • sizeAsync

        public > sizeAsync()
        Description copied from interface: RStreamAsync
        Returns number of entries in stream
        Specified by:
        sizeAsync in interface RStreamAsync<K,​V>
        Returns:
        size of stream
      • read

        public <,​<<K,​V>>> read​(StreamMultiReadArgs args)
        Description copied from interface: RStream
        Read stream data from multiple streams including current.

        Usage examples:

         Map result = stream.read(StreamMultiReadArgs.greaterThan(id, "stream2", id2));
         
         Map result = stream.read(StreamMultiReadArgs.greaterThan(id, "stream2", id2)
                                         .count(100)
                                         .timeout(Duration.ofSeconds(5))));
         
        Specified by:
        read in interface RStream<K,​V>
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • readAsync

        public <,​<<K,​V>>>> readAsync​(StreamMultiReadArgs args)
        Description copied from interface: RStreamAsync
        Read stream data from multiple streams including current.
        Specified by:
        readAsync in interface RStreamAsync<K,​V>
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • read

        public <<K,​V>> read​(StreamReadArgs args)
        Description copied from interface: RStream
        Read stream data from current stream only.

        Usage examples:

         Map result = stream.read(StreamReadArgs.greaterThan(id));
         
         Map result = stream.read(StreamReadArgs.greaterThan(id)
                                         .count(100)
                                         .timeout(Duration.ofSeconds(5))));
         
        Specified by:
        read in interface RStream<K,​V>
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • readAsync

        public <<K,​V>>> readAsync​(StreamReadArgs args)
        Description copied from interface: RStreamAsync
        Read stream data from current stream only.
        Specified by:
        readAsync in interface RStreamAsync<K,​V>
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • add

        public StreamMessageId add​(StreamAddArgs<K,​V> args)
        Description copied from interface: RStream
        Appends a new entry/entries and returns generated Stream Message ID

        Usage examples:

         StreamMessageId id = stream.add(StreamAddArgs.entry(15, 37));
         
         StreamMessageId id = stream.add(StreamAddArgs.entries(15, 37, 23, 43)
                                         .trim(TrimStrategy.MAXLEN, 100)));
         
        Specified by:
        add in interface RStream<K,​V>
        Parameters:
        args - - method arguments object
        Returns:
        Stream Message ID
      • add

        public void add​(StreamMessageId id,
                        StreamAddArgs<K,​V> args)
        Description copied from interface: RStream
        Appends a new entry/entries by specified Stream Message ID

        Usage examples:

         stream.add(id, StreamAddArgs.entry(15, 37));
         
         stream.add(id, StreamAddArgs.entries(15, 37, 23, 43)
                                         .trim(TrimStrategy.MAXLEN, 100)));
         
        Specified by:
        add in interface RStream<K,​V>
        Parameters:
        id - - Stream Message ID
        args - - method arguments object
      • addAsync

        public > addAsync​(StreamMessageId id,
                                      StreamAddArgs<K,​V> args)
        Description copied from interface: RStreamAsync
        Appends a new entry/entries by specified Stream Message ID
        Specified by:
        addAsync in interface RStreamAsync<K,​V>
        Parameters:
        id - - Stream Message ID
        args - - method arguments object
      • add

        public void add​(StreamMessageId id,
                        K key,
                        V value,
                        int trimLen,
                        boolean trimStrict)
        Specified by:
        add in interface RStream<K,​V>
      • rangeAsync

        public <<K,​V>>> rangeAsync​(int count,
                                                                             StreamMessageId startId,
                                                                             StreamMessageId endId)
        Description copied from interface: RStreamAsync
        Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
        Specified by:
        rangeAsync in interface RStreamAsync<K,​V>
        Parameters:
        count - - stream data size limit
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • range

        public <<K,​V>> range​(int count,
                                                               StreamMessageId startId,
                                                               StreamMessageId endId)
        Description copied from interface: RStream
        Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).
        Specified by:
        range in interface RStream<K,​V>
        Parameters:
        count - - stream data size limit
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        Returns:
        stream data mapped by Stream Message ID
      • rangeReversedAsync

        public <<K,​V>>> rangeReversedAsync​(int count,
                                                                                     StreamMessageId startId,
                                                                                     StreamMessageId endId)
        Description copied from interface: RStreamAsync
        Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
        Specified by:
        rangeReversedAsync in interface RStreamAsync<K,​V>
        Parameters:
        count - - stream data size limit
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • rangeReversed

        public <<K,​V>> rangeReversed​(int count,
                                                                       StreamMessageId startId,
                                                                       StreamMessageId endId)
        Description copied from interface: RStream
        Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).
        Specified by:
        rangeReversed in interface RStream<K,​V>
        Parameters:
        count - - stream data size limit
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        Returns:
        stream data mapped by Stream Message ID
      • rangeAsync

        public <<K,​V>>> rangeAsync​(StreamMessageId startId,
                                                                             StreamMessageId endId)
        Description copied from interface: RStreamAsync
        Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
        Specified by:
        rangeAsync in interface RStreamAsync<K,​V>
        Parameters:
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • rangeReversedAsync

        public <<K,​V>>> rangeReversedAsync​(StreamMessageId startId,
                                                                                     StreamMessageId endId)
        Description copied from interface: RStreamAsync
        Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
        Specified by:
        rangeReversedAsync in interface RStreamAsync<K,​V>
        Parameters:
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • range

        public <<K,​V>> range​(StreamMessageId startId,
                                                               StreamMessageId endId)
        Description copied from interface: RStream
        Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).
        Specified by:
        range in interface RStream<K,​V>
        Parameters:
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        Returns:
        stream data mapped by Stream Message ID
      • rangeReversed

        public <<K,​V>> rangeReversed​(StreamMessageId startId,
                                                                       StreamMessageId endId)
        Description copied from interface: RStream
        Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).
        Specified by:
        rangeReversed in interface RStream<K,​V>
        Parameters:
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        Returns:
        stream data mapped by Stream Message ID
      • removeAsync

        public > removeAsync​(StreamMessageId... ids)
        Description copied from interface: RStreamAsync
        Removes messages by id.
        Specified by:
        removeAsync in interface RStreamAsync<K,​V>
        Parameters:
        ids - - id of messages to remove
        Returns:
        deleted messages amount
      • remove

        public long remove​(StreamMessageId... ids)
        Description copied from interface: RStream
        Removes messages by id.
        Specified by:
        remove in interface RStream<K,​V>
        Parameters:
        ids - - id of messages to remove
        Returns:
        deleted messages amount
      • trim

        public long trim​(TrimStrategy strategy,
                         int threshold)
        Description copied from interface: RStream
        Trims stream to specified size
        Specified by:
        trim in interface RStream<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrict

        public long trimNonStrict​(TrimStrategy strategy,
                                  int threshold,
                                  int limit)
        Description copied from interface: RStream
        Trims stream using almost exact trimming threshold up to limit.
        Specified by:
        trimNonStrict in interface RStream<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        limit - - trim limit
        Returns:
        number of deleted messages
      • trimAsync

        public > trimAsync​(TrimStrategy strategy,
                                       int threshold)
        Description copied from interface: RStreamAsync
        Trims stream to specified size
        Specified by:
        trimAsync in interface RStreamAsync<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrictAsync

        public > trimNonStrictAsync​(TrimStrategy strategy,
                                                int threshold,
                                                int limit)
        Description copied from interface: RStreamAsync
        Trims stream using almost exact trimming threshold up to limit.
        Specified by:
        trimNonStrictAsync in interface RStreamAsync<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        limit - - trim limit
        Returns:
        number of deleted messages
      • trimNonStrict

        public long trimNonStrict​(TrimStrategy strategy,
                                  int threshold)
        Description copied from interface: RStream
        Trims stream using almost exact trimming threshold.
        Specified by:
        trimNonStrict in interface RStream<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        Returns:
        number of deleted messages
      • trimNonStrictAsync

        public > trimNonStrictAsync​(TrimStrategy strategy,
                                                int threshold)
        Description copied from interface: RStreamAsync
        Trims stream using almost exact trimming threshold.
        Specified by:
        trimNonStrictAsync in interface RStreamAsync<K,​V>
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        Returns:
        number of deleted messages
      • trimAsync

        public > trimAsync​(int count)
        Description copied from interface: RStreamAsync
        Trims stream using MAXLEN strategy to specified size
        Specified by:
        trimAsync in interface RStreamAsync<K,​V>
        Parameters:
        count - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrictAsync

        public > trimNonStrictAsync​(int count)
        Description copied from interface: RStreamAsync
        Trims stream using MAXLEN strategy to almost exact trimming threshold.
        Specified by:
        trimNonStrictAsync in interface RStreamAsync<K,​V>
        Parameters:
        count - - new size of stream
        Returns:
        number of deleted messages
      • trim

        public long trim​(int count)
        Description copied from interface: RStream
        Trims stream using MAXLEN strategy to specified size
        Specified by:
        trim in interface RStream<K,​V>
        Parameters:
        count - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrict

        public long trimNonStrict​(int count)
        Description copied from interface: RStream
        Trims stream using MAXLEN strategy to almost exact trimming threshold..
        Specified by:
        trimNonStrict in interface RStream<K,​V>
        Parameters:
        count - - new size of stream
        Returns:
        number of deleted messages
      • removeGroupAsync

        public > removeGroupAsync​( groupName)
        Description copied from interface: RStreamAsync
        Removes group by name.
        Specified by:
        removeGroupAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        void
      • removeGroup

        public void removeGroup​( groupName)
        Description copied from interface: RStream
        Removes group by name.
        Specified by:
        removeGroup in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
      • createConsumer

        public void createConsumer​( groupName,
                                    consumerName)
        Description copied from interface: RStream
        Creates consumer of the group by name.

        Requires Redis 6.2.0 and higher.

        Specified by:
        createConsumer in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
      • createConsumerAsync

        public > createConsumerAsync​( groupName,
                                                  consumerName)
        Description copied from interface: RStreamAsync
        Creates consumer of the group by name.

        Requires Redis 6.2.0 and higher.

        Specified by:
        createConsumerAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
      • removeConsumerAsync

        public > removeConsumerAsync​( groupName,
                                                  consumerName)
        Description copied from interface: RStreamAsync
        Removes consumer of the group by name.
        Specified by:
        removeConsumerAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        Returns:
        number of pending messages owned by consumer
      • removeConsumer

        public long removeConsumer​( groupName,
                                    consumerName)
        Description copied from interface: RStream
        Removes consumer of the group by name.
        Specified by:
        removeConsumer in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        Returns:
        number of pending messages owned by consumer
      • updateGroupMessageIdAsync

        public > updateGroupMessageIdAsync​( groupName,
                                                       StreamMessageId id)
        Description copied from interface: RStreamAsync
        Updates next message id delivered to consumers.
        Specified by:
        updateGroupMessageIdAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        id - - Stream Message ID
        Returns:
        void
      • updateGroupMessageId

        public void updateGroupMessageId​( groupName,
                                         StreamMessageId id)
        Description copied from interface: RStream
        Updates next message id delivered to consumers.
        Specified by:
        updateGroupMessageId in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        id - - Stream Message ID
      • getInfo

        public StreamInfo<K,​V> getInfo()
        Description copied from interface: RStream
        Returns information about this stream.
        Specified by:
        getInfo in interface RStream<K,​V>
        Returns:
        info object
      • listGroups

        public <StreamGroup> listGroups()
        Description copied from interface: RStream
        Returns list of common info about groups belonging to this stream.
        Specified by:
        listGroups in interface RStream<K,​V>
        Returns:
        list of info objects
      • listGroupsAsync

        public <StreamGroup>> listGroupsAsync()
        Description copied from interface: RStreamAsync
        Returns list of objects with information about groups belonging to this stream.
        Specified by:
        listGroupsAsync in interface RStreamAsync<K,​V>
        Returns:
        list of info objects
      • listConsumers

        public < groupName)
        Description copied from interface: RStream
        Returns list of common info about group customers for specified groupName.
        Specified by:
        listConsumers in interface RStream<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        list of info objects
      • listConsumersAsync

        public < groupName)
        Description copied from interface: RStreamAsync
        Returns list of objects with information about group customers for specified groupName.
        Specified by:
        listConsumersAsync in interface RStreamAsync<K,​V>
        Parameters:
        groupName - - name of group
        Returns:
        list of info objects
      • expire

        public boolean expire​(long timeToLive,
                               timeUnit)
        Description copied from interface: RExpirable
        Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
        Specified by:
        expire in interface RExpirable
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAsync

        public > expireAsync​(long timeToLive,
                                             timeUnit)
        Description copied from interface: RExpirableAsync
        Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.
        Specified by:
        expireAsync in interface RExpirableAsync
        Parameters:
        timeToLive - - timeout before object will be deleted
        timeUnit - - timeout time unit
        Returns:
        true if the timeout was set and false if not
      • expireAt

        public boolean expireAt​(long timestamp)
        Description copied from interface: RExpirable
        Specified by:
        expireAt in interface RExpirable
        Parameters:
        timestamp - - expire date in milliseconds (Unix timestamp)
        Returns:
        true if the timeout was set and false if not
      • expire

        public boolean expire​( instant)
        Description copied from interface: RExpirable
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        Specified by:
        expire in interface RExpirable
        Parameters:
        instant - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAsync

        public > expireAsync​( instant)
        Description copied from interface: RExpirableAsync
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        Specified by:
        expireAsync in interface RExpirableAsync
        Parameters:
        instant - - expire date
        Returns:
        true if the timeout was set and false if not
      • expireAt

        public boolean expireAt​( timestamp)
        Description copied from interface: RExpirable
        Specified by:
        expireAt in interface RExpirable
        Parameters:
        timestamp - - expire date
        Returns:
        true if the timeout was set and false if not
      • clearExpire

        public boolean clearExpire()
        Description copied from interface: RExpirable
        Clear an expire timeout or expire date for object.
        Specified by:
        clearExpire in interface RExpirable
        Returns:
        true if timeout was removed false if object does not exist or does not have an associated timeout
      • clearExpireAsync

        public > clearExpireAsync()
        Description copied from interface: RExpirableAsync
        Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
        Specified by:
        clearExpireAsync in interface RExpirableAsync
        Returns:
        true if the timeout was cleared and false if not
      • remainTimeToLive

        public long remainTimeToLive()
        Description copied from interface: RExpirable
        Remaining time to live of Redisson object that has a timeout
        Specified by:
        remainTimeToLive in interface RExpirable
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • remainTimeToLiveAsync

        public > remainTimeToLiveAsync()
        Description copied from interface: RExpirableAsync
        Remaining time to live of Redisson object that has a timeout
        Specified by:
        remainTimeToLiveAsync in interface RExpirableAsync
        Returns:
        time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
      • expireAsync

        protected > expireAsync​(long timeToLive,
                                                timeUnit,
                                               ... keys)
      • expireAtAsync

        protected > expireAtAsync​(long timestamp,
                                                 ... keys)
      • clearExpireAsync

        protected > clearExpireAsync​(... keys)