From 406f2e1012cbd77faae2cb65e35bf6920aed8372 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Wed, 12 Jun 2024 14:29:07 -0700 Subject: [PATCH] Add optional javadocs Signed-off-by: Andrew Carbonetto --- .../commands/stream/StreamGroupOptions.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/java/client/src/main/java/glide/api/models/commands/stream/StreamGroupOptions.java b/java/client/src/main/java/glide/api/models/commands/stream/StreamGroupOptions.java index 888988d374..f1cceeed1e 100644 --- a/java/client/src/main/java/glide/api/models/commands/stream/StreamGroupOptions.java +++ b/java/client/src/main/java/glide/api/models/commands/stream/StreamGroupOptions.java @@ -16,7 +16,7 @@ public final class StreamGroupOptions { public static final String MAKE_STREAM_REDIS_API = "MKSTREAM"; public static final String ENTRIES_READ_REDIS_API = "ENTRIESREAD"; - /** If the stream doesn't exist, creates a new stream with a length of 0. */ + /** If the stream doesn't exist, creates a new stream with a length of 0. */ boolean makeStream; /** @@ -28,15 +28,39 @@ public final class StreamGroupOptions { */ String entriesRead; + /** + * Options for {@link StreamBaseCommands#xgroupCreate(String, String, String, StreamGroupOptions)} + * + * @param makeStream If the stream doesn't exist, creates a new stream with a length of 0 + * . + */ public StreamGroupOptions(Boolean makeStream) { this.makeStream = makeStream; } + /** + * Options for {@link StreamBaseCommands#xgroupCreate(String, String, String, StreamGroupOptions)} + * + * @param entriesRead An arbitrary ID that isn't the first ID, last ID, or the zero "0-0" + * . Use it to find out how many entries are between the arbitrary ID (excluding it) + * and the stream's last entry. + * @since ENTRIESREAD was added in Redis 7.0.0. + */ public StreamGroupOptions(String entriesRead) { this.makeStream = false; this.entriesRead = entriesRead; } + /** + * Options for {@link StreamBaseCommands#xgroupCreate(String, String, String, StreamGroupOptions)} + * + * @param makeStream If the stream doesn't exist, creates a new stream with a length of 0 + * . + * @param entriesRead An arbitrary ID that isn't the first ID, last ID, or the zero "0-0" + * . Use it to find out how many entries are between the arbitrary ID (excluding it) + * and the stream's last entry. + * @since ENTRIESREAD was added in Redis 7.0.0. + */ public StreamGroupOptions(Boolean makeStream, String entriesRead) { this.makeStream = makeStream; this.entriesRead = entriesRead;