Package glide.api.models.commands.stream
Class StreamTrimOptions
- java.lang.Object
-
- glide.api.models.commands.stream.StreamTrimOptions
-
- Direct Known Subclasses:
StreamTrimOptions.MaxLen,StreamTrimOptions.MinId
public abstract class StreamTrimOptions extends java.lang.ObjectOptional arguments forStreamBaseCommands.xtrim(String, StreamTrimOptions)- See Also:
- valkey.io
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStreamTrimOptions.MaxLenOption to trim the stream according to maximum stream length.static classStreamTrimOptions.MinIdOption to trim the stream according to minimum ID.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.BooleanexactIftrue, the stream will be trimmed exactly.protected java.lang.LonglimitIf set, sets the maximal amount of entries that will be deleted.static java.lang.StringTRIM_EXACT_VALKEY_APIstatic java.lang.StringTRIM_LIMIT_VALKEY_APIstatic java.lang.StringTRIM_MAXLEN_VALKEY_APIstatic java.lang.StringTRIM_MINID_VALKEY_APIstatic java.lang.StringTRIM_NOT_EXACT_VALKEY_API
-
Constructor Summary
Constructors Constructor Description StreamTrimOptions()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.StringgetMethod()protected abstract java.lang.StringgetThreshold()protected java.util.List<java.lang.String>getValkeyApi()java.lang.String[]toArgs()Converts options forStreamBaseCommands.xtrim(String, StreamTrimOptions)into a String[].GlideString[]toGlideStringArgs()Converts options forStreamBaseCommands.xtrim(String, StreamTrimOptions)into a GlideString[].
-
-
-
Field Detail
-
TRIM_MAXLEN_VALKEY_API
public static final java.lang.String TRIM_MAXLEN_VALKEY_API
- See Also:
- Constant Field Values
-
TRIM_MINID_VALKEY_API
public static final java.lang.String TRIM_MINID_VALKEY_API
- See Also:
- Constant Field Values
-
TRIM_EXACT_VALKEY_API
public static final java.lang.String TRIM_EXACT_VALKEY_API
- See Also:
- Constant Field Values
-
TRIM_NOT_EXACT_VALKEY_API
public static final java.lang.String TRIM_NOT_EXACT_VALKEY_API
- See Also:
- Constant Field Values
-
TRIM_LIMIT_VALKEY_API
public static final java.lang.String TRIM_LIMIT_VALKEY_API
- See Also:
- Constant Field Values
-
exact
protected java.lang.Boolean exact
Iftrue, the stream will be trimmed exactly. Equivalent to=in the Valkey API. Otherwise, the stream will be trimmed in a near-exact manner, which is more efficient, equivalent to~in the Valkey API.
-
limit
protected java.lang.Long limit
If set, sets the maximal amount of entries that will be deleted.
-
-
Method Detail
-
getMethod
protected abstract java.lang.String getMethod()
-
getThreshold
protected abstract java.lang.String getThreshold()
-
getValkeyApi
protected java.util.List<java.lang.String> getValkeyApi()
-
toArgs
public java.lang.String[] toArgs()
Converts options forStreamBaseCommands.xtrim(String, StreamTrimOptions)into a String[].- Returns:
- String[]
-
toGlideStringArgs
public GlideString[] toGlideStringArgs()
Converts options forStreamBaseCommands.xtrim(String, StreamTrimOptions)into a GlideString[].- Returns:
- GlideString[]
-
-