Package org.redisson.api.stream
Class StreamTrimParams
java.lang.Object
org.redisson.api.stream.StreamTrimParams
- All Implemented Interfaces:
StreamTrimArgs
,StreamTrimLimitArgs<StreamTrimArgs>
,StreamTrimStrategyArgs<StreamTrimArgs>
public final class StreamTrimParams
extends Object
implements StreamTrimStrategyArgs<StreamTrimArgs>, StreamTrimArgs, StreamTrimLimitArgs<StreamTrimArgs>
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionint
getLimit()
int
getMinId()
limit
(int size) Defines limit of evicted objects for trim command.maxLen
(int threshold) Defines MAXLEN strategy used for Stream trimming.minId
(StreamMessageId messageId) Defines MINID strategy used for Stream trimming.noLimit()
Defines no limit of evicted objects for trim command.
-
Method Details
-
maxLen
Description copied from interface:StreamTrimStrategyArgs
Defines MAXLEN strategy used for Stream trimming. Evicts entries which position exceeds the specified stream's length threshold.- Specified by:
maxLen
in interfaceStreamTrimStrategyArgs<StreamTrimArgs>
- Parameters:
threshold
- - trim threshold- Returns:
- arguments object
-
minId
Description copied from interface:StreamTrimStrategyArgs
Defines MINID strategy used for Stream trimming. Evicts entries with IDs lower than threshold, where threshold is a stream ID.- Specified by:
minId
in interfaceStreamTrimStrategyArgs<StreamTrimArgs>
- Parameters:
messageId
- - stream Id- Returns:
- arguments object
-
noLimit
Description copied from interface:StreamTrimLimitArgs
Defines no limit of evicted objects for trim command.- Specified by:
noLimit
in interfaceStreamTrimLimitArgs<StreamTrimArgs>
- Returns:
- arguments object
-
limit
Description copied from interface:StreamTrimLimitArgs
Defines limit of evicted objects for trim command.- Specified by:
limit
in interfaceStreamTrimLimitArgs<StreamTrimArgs>
- Parameters:
size
- max amount of evicted objects- Returns:
- arguments object
-
getMaxLen
public int getMaxLen() -
getMinId
-
getLimit
public int getLimit()
-