Interface RStreamRx<K,​V>

  • Type Parameters:
    K - key type
    V - value type
    All Superinterfaces:
    RExpirableRx, RObjectRx

    public interface RStreamRx<K,​V>
    extends RExpirableRx
    Reactive interface for Redis Stream object.

    Requires Redis 5.0.0 and higher.

    Author:
    Nikita Koksharov
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      io.reactivex.rxjava3.core.Single<>  groupName, StreamMessageId... ids)
      Marks pending messages by group name and stream ids as correctly processed.
      io.reactivex.rxjava3.core.Single<StreamMessageId> add​(K key, V value)
      Deprecated.
      io.reactivex.rxjava3.core.Single<StreamMessageId> add​(K key, V value, int trimLen, boolean trimStrict)
      Deprecated.
      io.reactivex.rxjava3.core.Single<StreamMessageId> add​(StreamAddArgs<K,​V> args)
      Appends a new entry/entries and returns generated Stream Message ID
      io.reactivex.rxjava3.core.Completable add​(StreamMessageId id, K key, V value)
      Deprecated.
      io.reactivex.rxjava3.core.Completable add​(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
      Deprecated.
      io.reactivex.rxjava3.core.Completable add​(StreamMessageId id, StreamAddArgs<K,​V> args)
      Appends a new entry/entries by specified Stream Message ID
      io.reactivex.rxjava3.core.Single<StreamMessageId> <K,​V> entries)
      Deprecated.
      io.reactivex.rxjava3.core.Single<StreamMessageId> <K,​V> entries, int trimLen, boolean trimStrict)
      Deprecated.
      io.reactivex.rxjava3.core.Completable addAll​(StreamMessageId id, <K,​V> entries)
      Deprecated.
      io.reactivex.rxjava3.core.Completable addAll​(StreamMessageId id, <K,​V> entries, int trimLen, boolean trimStrict)
      Deprecated.
      io.reactivex.rxjava3.core.Single<AutoClaimResult<K,​V>>  groupName,  consumerName, long idleTime,  idleTimeUnit, StreamMessageId startId, int count)
      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.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, long idleTime,  idleTimeUnit, StreamMessageId... ids)
      Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
      io.reactivex.rxjava3.core.Completable  groupName,  consumerName)
      Creates consumer of the group by name.
      io.reactivex.rxjava3.core.Completable  groupName)
      Creates consumer group by name.
      io.reactivex.rxjava3.core.Completable  groupName, StreamMessageId id)
      Creates consumer group by name and stream id.
      io.reactivex.rxjava3.core.Single<FastAutoClaimResult>  groupName,  consumerName, long idleTime,  idleTimeUnit, StreamMessageId startId, int count)
      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.
      io.reactivex.rxjava3.core.Single<StreamInfo<K,​V>> getInfo()
      Returns information about this stream.
      io.reactivex.rxjava3.core.Single<PendingResult>  groupName)
      Returns common info about pending messages by group name.
      io.reactivex.rxjava3.core.Single<<StreamConsumer>>  groupName)
      Returns list of objects with information about group customers for specified groupName.
      io.reactivex.rxjava3.core.Single<<StreamGroup>> listGroups()
      Returns list of objects with information about groups belonging to this stream.
      io.reactivex.rxjava3.core.Single<PendingResult>  groupName)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<PendingEntry>>  groupName,  consumerName, StreamMessageId startId, StreamMessageId endId, int count)
      Returns list of pending messages by group name and consumer name.
      io.reactivex.rxjava3.core.Single<<PendingEntry>>  groupName,  consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime,  idleTimeUnit, int count)
      Returns list of common info about pending messages by group and consumer name.
      io.reactivex.rxjava3.core.Single<<PendingEntry>>  groupName, StreamMessageId startId, StreamMessageId endId, int count)
      Returns list of pending messages by group name.
      io.reactivex.rxjava3.core.Single<<PendingEntry>>  groupName, StreamMessageId startId, StreamMessageId endId, long idleTime,  idleTimeUnit, int count)
      Returns list of common info about pending messages by group name.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, StreamMessageId startId, StreamMessageId endId, int count)
      Returns stream data of pending messages by group and customer name.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime,  idleTimeUnit, int count)
      Returns stream data of pending messages by group and customer name.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName, StreamMessageId startId, StreamMessageId endId, int count)
      Returns stream data of pending messages by group name.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName, StreamMessageId startId, StreamMessageId endId, long idleTime,  idleTimeUnit, int count)
      Returns stream data of pending messages by group name.
      io.reactivex.rxjava3.core.Single<<<K,​V>>> range​(int count, StreamMessageId startId, StreamMessageId endId)
      Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
      io.reactivex.rxjava3.core.Single<<<K,​V>>> range​(StreamMessageId startId, StreamMessageId endId)
      Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
      io.reactivex.rxjava3.core.Single<<<K,​V>>> rangeReversed​(int count, StreamMessageId startId, StreamMessageId endId)
      Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
      io.reactivex.rxjava3.core.Single<<<K,​V>>> rangeReversed​(StreamMessageId startId, StreamMessageId endId)
      Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
      io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(int count, long timeout,  unit, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, long timeout,  unit, StreamMessageId id,  name2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, long timeout,  unit, StreamMessageId id,  name2, StreamMessageId id2,  name3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, long timeout,  unit, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(int count, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, StreamMessageId id,  name2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, StreamMessageId id,  name2, StreamMessageId id2,  name3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(long timeout,  unit, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(long timeout,  unit, StreamMessageId id,  name2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(long timeout,  unit, StreamMessageId id,  name2, StreamMessageId id2,  name3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(long timeout,  unit, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(StreamMultiReadArgs args)
      Read stream data from multiple streams including current.
      io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(StreamReadArgs args)
      Read stream data from current stream only.
      io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(StreamMessageId id,  name2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(StreamMessageId id,  name2, StreamMessageId id2,  name3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, int count, long timeout,  unit, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, int count, long timeout,  unit, StreamMessageId id,  key2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, int count, long timeout,  unit, StreamMessageId id,  key2, StreamMessageId id2,  key3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, int count, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, int count, StreamMessageId id,  key2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, int count, StreamMessageId id,  key2, StreamMessageId id2,  key3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, int count, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, long timeout,  unit, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, long timeout,  unit, StreamMessageId id,  key2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, long timeout,  unit, StreamMessageId id,  key2, StreamMessageId id2,  key3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, long timeout,  unit, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, StreamMultiReadGroupArgs args)
      Read stream data from consumer group and multiple streams including current.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, StreamReadGroupArgs args)
      Read stream data from consumer group and current stream only.
      io.reactivex.rxjava3.core.Single<<<K,​V>>>  groupName,  consumerName, StreamMessageId... ids)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, StreamMessageId id,  key2, StreamMessageId id2)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, StreamMessageId id,  key2, StreamMessageId id2,  key3, StreamMessageId id3)
      Deprecated.
      io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>>  groupName,  consumerName, StreamMessageId id, <,​StreamMessageId> nameToId)
      Deprecated.
      io.reactivex.rxjava3.core.Single<> remove​(StreamMessageId... ids)
      Removes messages by id.
      io.reactivex.rxjava3.core.Single<>  groupName,  consumerName)
      Removes consumer of the group by name.
      io.reactivex.rxjava3.core.Completable  groupName)
      Removes group by name.
      io.reactivex.rxjava3.core.Single<> size()
      Returns number of entries in stream
      io.reactivex.rxjava3.core.Single<> trim​(int size)
      Trims stream to specified size
      io.reactivex.rxjava3.core.Single<> trim​(TrimStrategy strategy, int threshold)
      Trims stream to specified size
      io.reactivex.rxjava3.core.Single<> trimNonStrict​(int size)
      Trims stream to few tens of entries more than specified length to trim.
      io.reactivex.rxjava3.core.Single<> trimNonStrict​(TrimStrategy strategy, int threshold)
      Trims stream using almost exact trimming threshold.
      io.reactivex.rxjava3.core.Single<> trimNonStrict​(TrimStrategy strategy, int threshold, int limit)
      Trims stream using almost exact trimming threshold up to limit.
      io.reactivex.rxjava3.core.Completable  groupName, StreamMessageId id)
      Updates next message id delivered to consumers.
    • Method Detail

      • createGroup

        io.reactivex.rxjava3.core.Completable createGroup​( groupName)
        Creates consumer group by name.
        Parameters:
        groupName - - name of group
        Returns:
        void
      • createGroup

        io.reactivex.rxjava3.core.Completable createGroup​( groupName,
                                                          StreamMessageId id)
        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

        Parameters:
        groupName - - name of group
        id - - stream id
        Returns:
        void
      • removeGroup

        io.reactivex.rxjava3.core.Completable removeGroup​( groupName)
        Removes group by name.
        Parameters:
        groupName - - name of group
        Returns:
        void
      • createConsumer

        io.reactivex.rxjava3.core.Completable createConsumer​( groupName,
                                                              consumerName)
        Creates consumer of the group by name.

        Requires Redis 6.2.0 and higher.

        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
      • removeConsumer

        io.reactivex.rxjava3.core.Single<> removeConsumer​( groupName,
                                                               consumerName)
        Removes consumer of the group by name.
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        Returns:
        number of pending messages owned by consumer
      • updateGroupMessageId

        io.reactivex.rxjava3.core.Completable updateGroupMessageId​( groupName,
                                                                   StreamMessageId id)
        Updates next message id delivered to consumers.
        Parameters:
        groupName - - name of group
        id - - Stream Message ID
        Returns:
        void
      • ack

        io.reactivex.rxjava3.core.Single<> ack​( groupName,
                                                   StreamMessageId... ids)
        Marks pending messages by group name and stream ids as correctly processed.
        Parameters:
        groupName - - name of group
        ids - - stream ids
        Returns:
        marked messages amount
      • getPendingInfo

        io.reactivex.rxjava3.core.Single< groupName)
        Returns common info about pending messages by group name.
        Parameters:
        groupName - - name of group
        Returns:
        result object
      • listPending

        io.reactivex.rxjava3.core.Single< groupName)
        Deprecated.
      • listPending

        io.reactivex.rxjava3.core.Single<< groupName,
                                                                         StreamMessageId startId,
                                                                         StreamMessageId endId,
                                                                         int count)
        Returns list of pending messages by group name. Limited by start stream id and end stream id and count.

        StreamMessageId.MAX is used as max stream id StreamMessageId.MIN is used as min stream id

        Parameters:
        groupName - - name of group
        startId - - start stream id
        endId - - end stream id
        count - - amount of messages
        Returns:
        list
      • listPending

        io.reactivex.rxjava3.core.Single<< groupName,
                                                                          consumerName,
                                                                         StreamMessageId startId,
                                                                         StreamMessageId endId,
                                                                         int count)
        Returns list of pending messages by group name and consumer name. Limited by start stream id and end stream id and count.

        StreamMessageId.MAX is used as max stream id StreamMessageId.MIN is used as min stream id

        Parameters:
        consumerName - - name of consumer
        groupName - - name of group
        startId - - start stream id
        endId - - end stream id
        count - - amount of messages
        Returns:
        list
      • pendingRange

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                                 StreamMessageId startId,
                                                                                                 StreamMessageId endId,
                                                                                                 long idleTime,
                                                                                                  idleTimeUnit,
                                                                                                 int count)
        Returns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.

        StreamMessageId.MAX is used as max Stream Message ID StreamMessageId.MIN is used as min Stream Message ID

        Requires Redis 6.2.0 and higher.

        Parameters:
        groupName - - name of group
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        count - - amount of messages
        Returns:
        map
        See Also:
        listPending(java.lang.String)
      • pendingRange

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                                  consumerName,
                                                                                                 StreamMessageId startId,
                                                                                                 StreamMessageId endId,
                                                                                                 long idleTime,
                                                                                                  idleTimeUnit,
                                                                                                 int count)
        Returns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.

        StreamMessageId.MAX is used as max Stream Message ID StreamMessageId.MIN is used as min Stream Message ID

        Requires Redis 6.2.0 and higher.

        Parameters:
        consumerName - - name of consumer
        groupName - - name of group
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        count - - amount of messages
        Returns:
        map
        See Also:
        listPending(java.lang.String)
      • claim

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                           consumerName,
                                                                                          long idleTime,
                                                                                           idleTimeUnit,
                                                                                          StreamMessageId... ids)
        Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
        Parameters:
        groupName - - name of group
        consumerName - - name of consumer
        idleTime - - minimum idle time of messages
        idleTimeUnit - - idle time unit
        ids - - stream ids
        Returns:
        stream data mapped by Stream ID
      • autoClaim

        io.reactivex.rxjava3.core.Single< groupName,
                                                                                consumerName,
                                                                               long idleTime,
                                                                                idleTimeUnit,
                                                                               StreamMessageId startId,
                                                                               int count)
        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.
        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

        io.reactivex.rxjava3.core.Single< groupName,
                                                                             consumerName,
                                                                            long idleTime,
                                                                             idleTimeUnit,
                                                                            StreamMessageId startId,
                                                                            int count)
        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.
        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

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                StreamMultiReadGroupArgs args)
        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))));
         
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • readGroup

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                               consumerName,
                                                                                              StreamReadGroupArgs args)
        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))));
         
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • readGroup

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                               consumerName,
                                                                                              StreamMessageId... ids)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                               consumerName,
                                                                                              int count,
                                                                                              StreamMessageId... ids)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                               consumerName,
                                                                                              long timeout,
                                                                                               unit,
                                                                                              StreamMessageId... ids)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                               consumerName,
                                                                                              int count,
                                                                                              long timeout,
                                                                                               unit,
                                                                                              StreamMessageId... ids)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                int count,
                                                                                                                StreamMessageId id,
                                                                                                                <,​StreamMessageId> nameToId)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                int count,
                                                                                                                long timeout,
                                                                                                                 unit,
                                                                                                                StreamMessageId id,
                                                                                                                 key2,
                                                                                                                StreamMessageId id2)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                long timeout,
                                                                                                                 unit,
                                                                                                                StreamMessageId id,
                                                                                                                <,​StreamMessageId> nameToId)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                int count,
                                                                                                                StreamMessageId id,
                                                                                                                 key2,
                                                                                                                StreamMessageId id2)
        Deprecated.
      • readGroup

        io.reactivex.rxjava3.core.Single<<,​<< groupName,
                                                                                                                 consumerName,
                                                                                                                long timeout,
                                                                                                                 unit,
                                                                                                                StreamMessageId id,
                                                                                                                 key2,
                                                                                                                StreamMessageId id2)
        Deprecated.
      • size

        io.reactivex.rxjava3.core.Single<> size()
        Returns number of entries in stream
        Returns:
        size of stream
      • add

        io.reactivex.rxjava3.core.Single<StreamMessageId> add​(StreamAddArgs<K,​V> args)
        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)));
         
        Parameters:
        args - - method arguments object
        Returns:
        Stream Message ID
      • add

        io.reactivex.rxjava3.core.Completable add​(StreamMessageId id,
                                                  StreamAddArgs<K,​V> args)
        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)));
         
        Parameters:
        id - - Stream Message ID
        args - - method arguments object
      • add

        io.reactivex.rxjava3.core.Single<StreamMessageId> add​(K key,
                                                              V value)
        Deprecated.
      • add

        io.reactivex.rxjava3.core.Completable add​(StreamMessageId id,
                                                  K key,
                                                  V value)
        Deprecated.
      • add

        io.reactivex.rxjava3.core.Single<StreamMessageId> add​(K key,
                                                              V value,
                                                              int trimLen,
                                                              boolean trimStrict)
        Deprecated.
      • add

        io.reactivex.rxjava3.core.Completable add​(StreamMessageId id,
                                                  K key,
                                                  V value,
                                                  int trimLen,
                                                  boolean trimStrict)
        Deprecated.
      • addAll

        io.reactivex.rxjava3.core.Single<<K,​V> entries)
        Deprecated.
      • addAll

        io.reactivex.rxjava3.core.Completable addAll​(StreamMessageId id,
                                                     <K,​V> entries)
        Deprecated.
      • addAll

        io.reactivex.rxjava3.core.Single<<K,​V> entries,
                                                                 int trimLen,
                                                                 boolean trimStrict)
        Deprecated.
      • addAll

        io.reactivex.rxjava3.core.Completable addAll​(StreamMessageId id,
                                                     <K,​V> entries,
                                                     int trimLen,
                                                     boolean trimStrict)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(StreamMultiReadArgs args)
        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))));
         
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by stream name and Stream Message ID
      • read

        io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(StreamReadArgs args)
        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))));
         
        Parameters:
        args - - method arguments object
        Returns:
        stream data mapped by Stream Message ID
      • read

        io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(StreamMessageId... ids)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(int count,
                                                                                         StreamMessageId... ids)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(long timeout,
                                                                                          unit,
                                                                                         StreamMessageId... ids)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<<K,​V>>> read​(int count,
                                                                                         long timeout,
                                                                                          unit,
                                                                                         StreamMessageId... ids)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count,
                                                                                                           long timeout,
                                                                                                            unit,
                                                                                                           StreamMessageId id,
                                                                                                            name2,
                                                                                                           StreamMessageId id2)
        Deprecated.
      • read

        io.reactivex.rxjava3.core.Single<<,​<<K,​V>>>> read​(int count,
                                                                                                           long timeout,
                                                                                                            unit,
                                                                                                           StreamMessageId id,
                                                                                                           <,​StreamMessageId> nameToId)
        Deprecated.
      • range

        io.reactivex.rxjava3.core.Single<<<K,​V>>> range​(StreamMessageId startId,
                                                                                          StreamMessageId endId)
        Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
        Parameters:
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • range

        io.reactivex.rxjava3.core.Single<<<K,​V>>> range​(int count,
                                                                                          StreamMessageId startId,
                                                                                          StreamMessageId endId)
        Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).
        Parameters:
        count - - stream data size limit
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • rangeReversed

        io.reactivex.rxjava3.core.Single<<<K,​V>>> rangeReversed​(StreamMessageId startId,
                                                                                                  StreamMessageId endId)
        Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
        Parameters:
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • rangeReversed

        io.reactivex.rxjava3.core.Single<<<K,​V>>> rangeReversed​(int count,
                                                                                                  StreamMessageId startId,
                                                                                                  StreamMessageId endId)
        Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).
        Parameters:
        count - - stream data size limit
        startId - - start Stream ID
        endId - - end Stream ID
        Returns:
        stream data mapped by Stream ID
      • remove

        io.reactivex.rxjava3.core.Single<> remove​(StreamMessageId... ids)
        Removes messages by id.
        Parameters:
        ids - - id of messages to remove
        Returns:
        deleted messages amount
      • trim

        io.reactivex.rxjava3.core.Single<> trim​(int size)
        Trims stream to specified size
        Parameters:
        size - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrict

        io.reactivex.rxjava3.core.Single<> trimNonStrict​(int size)
        Trims stream to few tens of entries more than specified length to trim.
        Parameters:
        size - - new size of stream
        Returns:
        number of deleted messages
      • trim

        io.reactivex.rxjava3.core.Single<> trim​(TrimStrategy strategy,
                                                    int threshold)
        Trims stream to specified size
        Parameters:
        strategy - - trim strategy
        threshold - - new size of stream
        Returns:
        number of deleted messages
      • trimNonStrict

        io.reactivex.rxjava3.core.Single<> trimNonStrict​(TrimStrategy strategy,
                                                             int threshold)
        Trims stream using almost exact trimming threshold.
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        Returns:
        number of deleted messages
      • trimNonStrict

        io.reactivex.rxjava3.core.Single<> trimNonStrict​(TrimStrategy strategy,
                                                             int threshold,
                                                             int limit)
        Trims stream using almost exact trimming threshold up to limit.
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        limit - - trim limit
        Returns:
        number of deleted messages
      • getInfo

        io.reactivex.rxjava3.core.Single<StreamInfo<K,​V>> getInfo()
        Returns information about this stream.
        Returns:
        info object
      • listGroups

        io.reactivex.rxjava3.core.Single<<StreamGroup>> listGroups()
        Returns list of objects with information about groups belonging to this stream.
        Returns:
        list of info objects
      • listConsumers

        io.reactivex.rxjava3.core.Single<< groupName)
        Returns list of objects with information about group customers for specified groupName.
        Parameters:
        groupName - - name of group
        Returns:
        list of info objects
      • pendingRange

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                                 StreamMessageId startId,
                                                                                                 StreamMessageId endId,
                                                                                                 int count)
        Returns stream data of pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.

        StreamMessageId.MAX is used as max Stream Message ID StreamMessageId.MIN is used as min Stream Message ID

        Parameters:
        groupName - - name of group
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        count - - amount of messages
        Returns:
        map
        See Also:
        listPending(java.lang.String)
      • pendingRange

        io.reactivex.rxjava3.core.Single<<< groupName,
                                                                                                  consumerName,
                                                                                                 StreamMessageId startId,
                                                                                                 StreamMessageId endId,
                                                                                                 int count)
        Returns stream data of pending messages by group and customer name. Limited by start Stream Message ID and end Stream Message ID and count.

        StreamMessageId.MAX is used as max Stream Message ID StreamMessageId.MIN is used as min Stream Message ID

        Parameters:
        consumerName - - name of consumer
        groupName - - name of group
        startId - - start Stream Message ID
        endId - - end Stream Message ID
        count - - amount of messages
        Returns:
        map
        See Also:
        listPending(java.lang.String)