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) {