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 Summary
Constructors Constructor Description XTrimArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XTrimArgslimit(long limit)Sets the maximum entries that can get evicted.XTrimArgsmaxlen(long maxlen)Sets the max length of the stream.XTrimArgsminid(String minid)Evicts entries from the stream having IDs lower to the specified one.XTrimArgsnearlyExactTrimming()When set, prefix themaxlenwith~to enable the almost exact trimming.List<String>toArgs()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
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 themaxlenwith~to enable the almost exact trimming. This is recommended when usingmaxlen(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 benull, 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<String> toArgs()
- Specified by:
toArgsin interfaceRedisCommandExtraArguments- Returns:
- the list of arguments, encoded as a list of String.
-
-