Skip to content

Commit 17405b0

Browse files
committed
Merge branch 'main' into twoone
# Conflicts: # build.gradle
2 parents e704148 + 71d1862 commit 17405b0

File tree

108 files changed

+3343
-1505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3343
-1505
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import aQute.bnd.gradle.Bundle
2+
import org.gradle.internal.os.OperatingSystem
23

34
plugins {
45
id("java")

src/main/java/io/nats/client/BaseConsumeOptions.java

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,19 @@
3131
* fetch operate. It is the base class for ConsumeOptions and FetchConsumeOptions.
3232
*/
3333
public class BaseConsumeOptions implements JsonSerializable {
34+
/** constant for default message count */
3435
public static final int DEFAULT_MESSAGE_COUNT = 500;
36+
/** constant for default message count when bytes */
3537
public static final int DEFAULT_MESSAGE_COUNT_WHEN_BYTES = 1_000_000;
38+
/** constant for default threshold percent */
3639
public static final int DEFAULT_THRESHOLD_PERCENT = 25;
40+
/** constant for default expires in millis */
3741
public static final long DEFAULT_EXPIRES_IN_MILLIS = 30000;
42+
/** constant for min expires mills */
3843
public static final long MIN_EXPIRES_MILLS = 1000;
44+
/** constant for max heartbeat millis */
3945
public static final long MAX_HEARTBEAT_MILLIS = 30000;
46+
/** constant for max idle heartbeat percent */
4047
public static final int MAX_IDLE_HEARTBEAT_PERCENT = 50;
4148

4249
protected final int messages;
@@ -94,34 +101,66 @@ public String toJson() {
94101

95102
protected void subclassSpecificToJson(StringBuilder sb) {}
96103

104+
/**
105+
* Get the expires setting
106+
* @return the expires, in milliseconds
107+
*/
97108
public long getExpiresInMillis() {
98109
return expiresIn;
99110
}
100111

112+
/**
113+
* Get the idle heartbeat value
114+
* @return the idle heartbeat in milliseconds
115+
*/
101116
public long getIdleHeartbeat() {
102117
return idleHeartbeat;
103118
}
104119

120+
/**
121+
* Get the threshold percent setting
122+
* @return the threshold percent
123+
*/
105124
public int getThresholdPercent() {
106125
return thresholdPercent;
107126
}
108127

128+
/**
129+
* Whether to raise status warnings to the error listener
130+
* @return true if should raise status warnings
131+
*/
109132
public boolean raiseStatusWarnings() {
110133
return raiseStatusWarnings;
111134
}
112135

136+
/**
137+
* Get the priority group setting
138+
* @return the priority group
139+
*/
113140
public String getGroup() {
114141
return group;
115142
}
116143

144+
/**
145+
* Get the priority setting
146+
* @return the priority
147+
*/
117148
public int getPriority() {
118149
return priority;
119150
}
120151

152+
/**
153+
* Get the min pending setting
154+
* @return the min pending
155+
*/
121156
public long getMinPending() {
122157
return minPending;
123158
}
124159

160+
/**
161+
* Get the min ack pending setting
162+
* @return the min ack pending
163+
*/
125164
public long getMinAckPending() {
126165
return minAckPending;
127166
}
@@ -143,7 +182,7 @@ protected static abstract class Builder<B, CO> {
143182
* Initialize values from the json string.
144183
* @param json the json string to parse
145184
* @return the builder
146-
* @throws JsonParseException if the json is invalid
185+
* @throws JsonParseException if there is a problem parsing the json
147186
*/
148187
public B json(String json) throws JsonParseException {
149188
return jsonValue(JsonParser.parse(json));

0 commit comments

Comments
 (0)