Class XTrimArgs

java.lang.Object
io.quarkus.redis.datasource.stream.XTrimArgs
All Implemented Interfaces:
RedisCommandExtraArguments

public class XTrimArgs extends Object implements RedisCommandExtraArguments
The argument of the XTRIM command.
  • Constructor Details

    • XTrimArgs

      public XTrimArgs()
  • Method Details

    • maxlen

      public XTrimArgs maxlen(long maxlen)
      Sets the max length of the stream.
      Parameters:
      maxlen - the max length of the stream, must be positive
      Returns:
      the current XAddArgs
    • nearlyExactTrimming

      public XTrimArgs nearlyExactTrimming()
      When set, prefix the maxlen with ~ to enable the almost exact trimming. This is recommended when using maxlen(long).
      Returns:
      the current XAddArgs
    • minid

      public XTrimArgs minid(String minid)
      Evicts entries from the stream having IDs lower to the specified one.
      Parameters:
      minid - the min id, must not be null, must be a valid stream id
      Returns:
      the current XAddArgs
    • limit

      public XTrimArgs limit(long limit)
      Sets the maximum entries that can get evicted.
      Parameters:
      limit - the limit, must be positive
      Returns:
      the current XAddArgs
    • toArgs

      public List<Object> toArgs()
      Specified by:
      toArgs in interface RedisCommandExtraArguments
      Returns:
      the list of arguments.