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 TypeMethodDescriptionintgetLimit()intgetMinId()booleanbooleanlimit(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.trim(TrimStrategy strategy, int threshold) trim(TrimStrategy strategy, int threshold, int limit) Defines non-strict trimming.trimStrict(TrimStrategy strategy, int threshold)
-
Method Details
-
noMakeStream
Description copied from interface:StreamAddArgsDefine to not create stream automatically if it doesn't exist.- Specified by:
noMakeStreamin interfaceStreamAddArgs<K,V> - Returns:
- arguments object
-
trim
- Specified by:
trimin interfaceStreamAddArgs<K,V>
-
trimStrict
- Specified by:
trimStrictin interfaceStreamAddArgs<K,V>
-
trim
- Specified by:
trimin interfaceStreamAddArgs<K,V>
-
trim
Description copied from interface:StreamAddArgsDefines strict trimming.- Specified by:
trimin interfaceStreamAddArgs<K,V> - Returns:
- arguments object
-
trimNonStrict
Description copied from interface:StreamAddArgsDefines non-strict trimming.- Specified by:
trimNonStrictin interfaceStreamAddArgs<K,V> - Returns:
- arguments object
-
maxLen
Description copied from interface:StreamTrimStrategyArgsDefines MAXLEN strategy used for Stream trimming. Evicts entries which position exceeds the specified stream's length threshold.- Specified by:
maxLenin interfaceStreamTrimStrategyArgs<K>- Parameters:
threshold- - trim threshold- Returns:
- arguments object
-
minId
Description copied from interface:StreamTrimStrategyArgsDefines MINID strategy used for Stream trimming. Evicts entries with IDs lower than threshold, where threshold is a stream ID.- Specified by:
minIdin interfaceStreamTrimStrategyArgs<K>- Parameters:
messageId- - stream Id- Returns:
- arguments object
-
noLimit
Description copied from interface:StreamTrimLimitArgsDefines no limit of evicted objects for trim command.- Specified by:
noLimitin interfaceStreamTrimLimitArgs<K>- Returns:
- arguments object
-
limit
Description copied from interface:StreamTrimLimitArgsDefines limit of evicted objects for trim command.- Specified by:
limitin 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()
-