Skip to content

Commit eda5f8b

Browse files
authored
Merge branch 'main' into message-filter-tuning-1
2 parents 236e53a + 71d1862 commit eda5f8b

File tree

116 files changed

+3506
-1635
lines changed

Some content is hidden

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

116 files changed

+3506
-1635
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ repositories {
3737
maven { url "https://repo1.maven.org/maven2/" }
3838
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
3939
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
40+
mavenLocal()
4041
}
4142

4243
dependencies {
4344
implementation 'org.bouncycastle:bcprov-lts8on:2.73.8'
4445
implementation 'org.jspecify:jspecify:1.0.0'
4546

4647
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
47-
testImplementation 'io.nats:jnats-server-runner:2.0.0'
48+
testImplementation 'io.nats:jnats-server-runner:3.0.1'
4849
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.12.3'
4950
}
5051

@@ -97,12 +98,18 @@ test {
9798

9899
javadoc {
99100
options.overview = 'src/main/javadoc/overview.html' // relative to source root
101+
options.memberLevel = JavadocMemberLevel.PUBLIC
100102
source = sourceSets.main.allJava
101103
title = "NATS.IO Java API"
102-
excludes = ['io/nats/client/impl',
103-
'io/nats/examples',
104-
"io/nats/client/api/ConsumerCreateRequest.java",
105-
"io/nats/client/api/MessageGetRequest.java"
104+
excludes = [
105+
"io/nats/client/impl",
106+
"io/nats/examples",
107+
"io/nats/client/api/ConsumerCreateRequest.java",
108+
"io/nats/client/api/MessageGetRequest.java",
109+
"io/nats/client/api/MessageDeleteRequest.java",
110+
"io/nats/client/support/IncomingHeadersProcessor.java",
111+
"io/nats/client/support/**",
112+
"**/Debug**"
106113
]
107114
classpath = sourceSets.main.runtimeClasspath
108115
doLast {

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)