Skip to content

Commit

Permalink
Add optional javadocs
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
  • Loading branch information
acarbonetto committed Jun 12, 2024
1 parent 6d4a1fd commit 406f2e1
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>0</code>. */
boolean makeStream;

/**
Expand All @@ -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 <code>0
* </code>.
*/
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 <code>"0-0"
* </code>. 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 <code>0
* </code>.
* @param entriesRead An arbitrary ID that isn't the first ID, last ID, or the zero <code>"0-0"
* </code>. 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;
Expand Down

0 comments on commit 406f2e1

Please sign in to comment.