From ccf423d89704b291e2857dc70ebdc00cada59070 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Mon, 1 Apr 2024 11:39:39 -0700 Subject: [PATCH] Add javadocs for trim options Signed-off-by: Andrew Carbonetto --- .../java/glide/api/models/commands/StreamAddOptions.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java b/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java index f86dd18c68..1f98dca863 100644 --- a/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java +++ b/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java @@ -51,7 +51,7 @@ public abstract static class StreamTrimOptions { protected abstract String getThreshold(); - public List addTrimOptions() { + protected List getRedisApi() { List optionArgs = new ArrayList<>(); optionArgs.add(this.getMethod()); @@ -67,6 +67,7 @@ public List addTrimOptions() { } } + /** Option to trim the stream according to minimum ID. */ public static class MinId extends StreamTrimOptions { /** Trim the stream according to entry ID. Equivalent to MINID in the Redis API. */ private final String threshold; @@ -106,6 +107,7 @@ protected String getThreshold() { } } + /** Option to trim the stream according to maximum stream length. */ public static class MaxLen extends StreamTrimOptions { /** * Trim the stream according to length.
@@ -161,7 +163,7 @@ public String[] toArgs() { } if (trim != null) { - optionArgs.addAll(trim.addTrimOptions()); + optionArgs.addAll(trim.getRedisApi()); } if (id != null) {