Package org.redisson.api.stream
Class StreamAddParams<K,V>
java.lang.Object
org.redisson.api.stream.StreamAddParams<K,V>
- All Implemented Interfaces:
StreamAddArgs<K,
,V> StreamTrimLimitArgs<StreamAddArgs<K,
,V>> StreamTrimStrategyArgs<StreamAddArgs<K,
V>>
public final class StreamAddParams<K,V>
extends Object
implements StreamAddArgs<K,V>, StreamTrimStrategyArgs<StreamAddArgs<K,V>>, StreamTrimLimitArgs<StreamAddArgs<K,V>>
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionint
getLimit()
int
getMinId()
boolean
boolean
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.Define to not create stream automatically if it doesn't exist.trim()
Defines strict trimming.Defines non-strict trimming.
-
Method Details
-
noMakeStream
Description copied from interface:StreamAddArgs
Define to not create stream automatically if it doesn't exist.- Specified by:
noMakeStream
in interfaceStreamAddArgs<K,
V> - Returns:
- arguments object
-
trim
Description copied from interface:StreamAddArgs
Defines strict trimming.- Specified by:
trim
in interfaceStreamAddArgs<K,
V> - Returns:
- arguments object
-
trimNonStrict
Description copied from interface:StreamAddArgs
Defines non-strict trimming.- Specified by:
trimNonStrict
in interfaceStreamAddArgs<K,
V> - Returns:
- arguments object
-
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<K>
- 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<K>
- 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<K>
- Returns:
- arguments object
-
limit
Description copied from interface:StreamTrimLimitArgs
Defines limit of evicted objects for trim command.- Specified by:
limit
in interfaceStreamTrimLimitArgs<K>
- Parameters:
size
- max amount of evicted objects- Returns:
- arguments object
-
getEntries
-
isNoMakeStream
public boolean isNoMakeStream() -
isTrimStrict
public boolean isTrimStrict() -
getMaxLen
public int getMaxLen() -
getMinId
-
getLimit
public int getLimit()
-