Skip to content

Commit 71d1862

Browse files
authored
Merge pull request #1476 from nats-io/much-javadoc
Javadoc Technical Debt
2 parents 9809a26 + 1026fbc commit 71d1862

File tree

108 files changed

+3353
-1510
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

+3353
-1510
lines changed

build.gradle

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ test {
9898

9999
javadoc {
100100
options.overview = 'src/main/javadoc/overview.html' // relative to source root
101+
options.memberLevel = JavadocMemberLevel.PUBLIC
101102
source = sourceSets.main.allJava
102103
title = "NATS.IO Java API"
103-
excludes = ['io/nats/client/impl',
104-
'io/nats/examples',
105-
"io/nats/client/api/ConsumerCreateRequest.java",
106-
"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**"
107113
]
108114
classpath = sourceSets.main.runtimeClasspath
109115
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)