Skip to content

Commit c2b360a

Browse files
authored
JavaDoc Cleanup (#42)
1 parent c85c626 commit c2b360a

34 files changed

+97
-93
lines changed

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ MapValue instances created from JSON to maintain the insertion order of fields
302302
in the map so that iteration is predictable.
303303

304304
### Fixed
305-
- Don't validate request sizes. On-premise only
305+
- Don't validate request sizes. On-premises only
306306
- JsonOptions.setPrettyPrint(true) now works
307307
- Request timeouts now operate correctly on milliseconds instead of rounding up to seconds
308308
- Changed min/max implementation to make them deterministic
@@ -317,7 +317,7 @@ removed in a future version.
317317
- Fix another memory leak that could occur on the receive side when the response
318318
was discarded due to unmatched request Id.
319319
- Fixed a problem where the HTTP Host header was not being adding in all request
320-
cases. This prevented use of an intermediate proxy such as Nginx, which validates headers. On-premise only.
320+
cases. This prevented use of an intermediate proxy such as Nginx, which validates headers. On-premises only.
321321
- TableUsageRequest: added validation check that startTime, endTime and limit
322322
must not be negative value.
323323

@@ -363,16 +363,16 @@ exact schema match is required on a put. The default behavior is false.
363363
- Added a new, simpler TableResult.waitForCompletion() interface to wait for the completion of a TableRequest vs waiting for a specific state.
364364
- Added NoSQLHandle.doTableRequest to encapsulate a TableRequest and waiting for
365365
its completion in a single, synchronous call.
366-
- Added OperationNotSupportedException to handle operations that are specific to on-premise and cloud service environments
366+
- Added OperationNotSupportedException to handle operations that are specific to on-premises and cloud service environments
367367

368-
- Support for both the Oracle NoSQL Database Cloud Service and the on-premise Oracle NoSQL Database product.
369-
- Added StoreAccessTokenProvider for authentication of access to an on-premise store
368+
- Support for both the Oracle NoSQL Database Cloud Service and the on-premises Oracle NoSQL Database product.
369+
- Added StoreAccessTokenProvider for authentication of access to an on-premises store
370370
- Added AuthenticationException to encapsulate authentication problems when
371-
accessing an on-premise store.
371+
accessing an on-premises store.
372372
- Added SystemRequest, SystemStatusRequest, and SystemResult for administrative
373373
operations that are not table-specific.
374374
- Added NoSQLHandle.doSystemRequest to encapsulate a SystemRequest and waiting for its completion in a single, synchronous call.
375-
- Now that the driver can access both the cloud service and an on-premise store
375+
- Now that the driver can access both the cloud service and an on-premises store
376376
some operations, classes and exceptions are specific to each environment. These are
377377
noted in updated javadoc.
378378

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ See the Quickstart example below for code details for using a Resource Principal
119119

120120
### Connecting to the Oracle NoSQL Database On-premise
121121

122-
The on-premise configuration requires a running instance of Oracle NoSQL
122+
The on-premises configuration requires a running instance of Oracle NoSQL
123123
Database. In addition a running proxy service is required. See
124124
[Oracle NoSQL Database Downloads](https://www.oracle.com/database/technologies/nosql-database-server-downloads.html) for downloads, and see
125125
[Information about the proxy](https://docs.oracle.com/en/database/other-databases/nosql-database/22.1/admin/proxy-and-driver.html)
@@ -149,7 +149,7 @@ Addional logging can be enabled using a java properties file. For full details,
149149

150150
The following is a quick start tutorial to run a simple program in all supported
151151
environments. It requires access to the Oracle NoSQL Database Cloud Service,
152-
a running on-premise Oracle NoSQL Database instance, or a running Oracle
152+
a running on-premises Oracle NoSQL Database instance, or a running Oracle
153153
NoSQL Cloud Simulator instance. As a standalone program it will run most easily
154154
using a download version of the Oracle NoSQL SDK for Java.
155155

@@ -166,7 +166,7 @@ Using the cloud service on region us-ashburn-1
166166
```
167167
$ java -cp .:<path-to-nosqldriver.jar> Quickstart -service cloud -endpoint us-ashburn-1
168168
```
169-
Using a non-secure on-premise service on endpoint http://localhost:8090
169+
Using a non-secure on-premises service on endpoint http://localhost:8090
170170
```
171171
$ java -cp .:<path-to-nosqldriver.jar> Quickstart -service onprem -endpoint http://localhost:8090
172172
```
@@ -225,7 +225,7 @@ import oracle.nosql.driver.values.MapValue;
225225
*
226226
* This program can be run against:
227227
* 1. the cloud service
228-
* 2. the on-premise proxy and Oracle NoSQL Database instance, secure or
228+
* 2. the on-premises proxy and Oracle NoSQL Database instance, secure or
229229
* not secure.
230230
* 3. the cloud simulator (CloudSim)
231231
*
@@ -512,7 +512,7 @@ $ mvn -pl examples exec:java -Dexec.mainClass=BasicTableExample \
512512
-Dexec.args="http://localhost:8080"
513513
```
514514

515-
Run BasicTableExample using an on-premise instance on endpoint
515+
Run BasicTableExample using an on-premises instance on endpoint
516516
localhost:8090
517517

518518
```
@@ -559,7 +559,7 @@ The region argument will change depending on which region you use.
559559

560560
#### Run using the Oracle NoSQL Database On-premise
561561

562-
Running against the on-premise Oracle NoSQL Database on-premise requires
562+
Running against the on-premises Oracle NoSQL Database on-premises requires
563563
a running instance of the database and running proxy service. See above.
564564

565565
Run against a not-secure proxy and store, with the proxy running on port 80:

driver/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<profiles>
5858

5959
<!-- test profiles used with the test target
60-
Running tests requires a running on-premise service and httpproxy
60+
Running tests requires a running on-premises service and httpproxy
6161
or a running cloud simulator. Required information:
6262
o endpoint
6363
Examples:
@@ -85,7 +85,7 @@
8585
<secure>false</secure>
8686
<onprem>false</onprem>
8787
<serverType>cloudsim</serverType>
88-
<!-- exclude non-server tests and on-premise tests -->
88+
<!-- exclude non-server tests and on-premises tests -->
8989
<excluded.tests>
9090
StoreAccessTokenProviderTest.java, ResourcePrincipalProviderTest.java,
9191
ConfigFileTest.java, SignatureProviderTest.java,

driver/src/main/java/oracle/nosql/driver/NoSQLHandle.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* information to be used by the handle.
4747
* <p>
4848
* The same interface is available to both users of the Oracle NoSQL Database
49-
* Cloud Service and the on-premise Oracle NoSQL Database; however, some methods
49+
* Cloud Service and the on-premises Oracle NoSQL Database; however, some methods
5050
* and/or parameters are specific to each environment. The documentation has notes
5151
* about whether a class, method, or parameter is environment-specific. Unless
5252
* otherwise noted they are applicable to both environments.
@@ -280,12 +280,12 @@ public interface NoSQLHandle extends AutoCloseable {
280280
/**
281281
* Queries a table based on the query statement specified in the
282282
* {@link QueryRequest}.
283-
*
283+
* <p>
284284
* Queries that include a full shard key will execute much more efficiently
285285
* than more distributed queries that must go to multiple shards.
286286
* <p>
287287
* Table- and system-style queries such as "CREATE TABLE ..." or "DROP TABLE .."
288-
* are not supported by this interfaces. Those operations must be performed using
288+
* are not supported by this interface. Those operations must be performed using
289289
* {@link #tableRequest} or {@link #systemRequest} as appropriate.
290290
* <p>
291291
* The amount of data read by a single query request is limited by a system
@@ -315,7 +315,7 @@ public interface NoSQLHandle extends AutoCloseable {
315315
/**
316316
* Queries a table based on the query statement specified in the
317317
* {@link QueryRequest} while returning an iterable result.
318-
*
318+
* <p>
319319
* Queries that include a full shard key will execute much more efficiently
320320
* than more distributed queries that must go to multiple shards.
321321
* <p>
@@ -325,7 +325,7 @@ public interface NoSQLHandle extends AutoCloseable {
325325
* and not this method.
326326
* <p>
327327
* Table- and system-style queries such as "CREATE TABLE ..." or "DROP TABLE .."
328-
* are not supported by this interfaces. Those operations must be performed using
328+
* are not supported by this interface. Those operations must be performed using
329329
* {@link #tableRequest} or {@link #systemRequest} as appropriate.
330330
* <p>
331331
* The results are returned through an iterator, if connected to the
@@ -428,7 +428,7 @@ TableResult doTableRequest(TableRequest request,
428428
int pollIntervalMs);
429429

430430
/**
431-
* On-premise only.
431+
* On-premises only.
432432
* <p>
433433
* Performs a system operation on the system, such as
434434
* administrative operations that don't affect a specific table. For
@@ -460,7 +460,7 @@ TableResult doTableRequest(TableRequest request,
460460
SystemResult systemRequest(SystemRequest request);
461461

462462
/**
463-
* On-premise only.
463+
* On-premises only.
464464
* <p>
465465
* Checks the status of an operation previously performed using
466466
* {@link #systemRequest}.
@@ -482,7 +482,7 @@ TableResult doTableRequest(TableRequest request,
482482
* state, provisioned throughput and capacity and schema. Dynamic
483483
* information such as usage is obtained using {@link #getTableUsage}.
484484
* Throughput, capacity and usage information is only available when using
485-
* the Cloud Service and will be null or not defined on-premise.
485+
* the Cloud Service and will be null or not defined on-premises.
486486
*
487487
* @param request the input parameters for the operation
488488
*
@@ -556,7 +556,7 @@ TableResult doTableRequest(TableRequest request,
556556
GetIndexesResult getIndexes(GetIndexesRequest request);
557557

558558
/**
559-
* On-premise only.
559+
* On-premises only.
560560
* <p>
561561
* Returns the namespaces in a store as an array of String.
562562
*
@@ -565,16 +565,16 @@ TableResult doTableRequest(TableRequest request,
565565
String[] listNamespaces();
566566

567567
/**
568-
* On-premise only.
569-
*
568+
* On-premises only.
569+
* <p>
570570
* Returns the roles in a store as an array of String.
571571
*
572572
* @return the list of roles or null if none are found
573573
*/
574574
String[] listRoles();
575575

576576
/**
577-
* On-premise only.
577+
* On-premises only.
578578
* <p>
579579
* Returns the users in a store as an array of {@link UserInfo}.
580580
*
@@ -583,7 +583,7 @@ TableResult doTableRequest(TableRequest request,
583583
UserInfo[] listUsers();
584584

585585
/**
586-
* On-premise only.
586+
* On-premises only.
587587
* <p>
588588
* A convenience method that performs a SystemRequest and waits for
589589
* completion of the operation. This is the same as calling {@link

driver/src/main/java/oracle/nosql/driver/NoSQLHandleConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ public NoSQLHandleConfig setPoolMaxPending(int poolMaxPending) {
770770

771771
/**
772772
* Sets the maximum size in bytes of request/response payloads.
773-
* On-premise only. This setting is ignored for cloud operations.
773+
* On-premises only. This setting is ignored for cloud operations.
774774
* If not set, or set to zero, the default value of 32MB is used.
775775
*
776776
* @param maxContentLength the maximum bytes allowed in
@@ -790,7 +790,7 @@ public NoSQLHandleConfig setMaxContentLength(int maxContentLength) {
790790

791791
/**
792792
* Returns the maximum size, in bytes, of a request operation payload.
793-
* On-premise only. This value is ignored for cloud operations.
793+
* On-premises only. This value is ignored for cloud operations.
794794
*
795795
* @return the size
796796
*/

driver/src/main/java/oracle/nosql/driver/Nson.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public static String toJsonString(ByteInputStream in) {
428428
*
429429
* @param in the input stream of NSON bytes
430430
* @param options {@link JsonOptions} to use for the serialization, or
431-
* null for default behavior.Th
431+
* null for default behavior
432432
* @return the JSON string
433433
* @throws IllegalArgumentException if there's a problem with serializing
434434
* NSON to JSON string

driver/src/main/java/oracle/nosql/driver/OperationNotSupportedException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* The operation attempted is not supported. This may be related to
12-
* on-premise vs cloud service configurations.
12+
* on-premises vs cloud service configurations.
1313
*/
1414
public class OperationNotSupportedException extends NoSQLException {
1515

driver/src/main/java/oracle/nosql/driver/UserInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package oracle.nosql.driver;
99

1010
/**
11-
* On-premise only.
11+
* On-premises only.
1212
* <p>
1313
* A class that encapsulates the information associated with a user including
1414
* the id and user name in the system.

driver/src/main/java/oracle/nosql/driver/http/Client.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,15 @@ private int nextRequestId() {
333333
/**
334334
* Execute the KV request and return the response. This is the top-level
335335
* method for request execution.
336-
*
336+
* <p>
337337
* This method handles exceptions to distinguish between what can be retried
338-
* what what cannot, making sure that root cause exceptions are
338+
* and what cannot, making sure that root cause exceptions are
339339
* kept. Examples:
340-
* o can't connect (host, port, etc)
341-
* o throttling exceptions
342-
* o general networking issues, IOException
340+
* <ul>
341+
* <li>can't connect (host, port, etc)</li>
342+
* <li>throttling exceptions</li>
343+
* <li>general networking issues, IOException</li>
344+
* </ul>
343345
*
344346
* RequestTimeoutException needs a cause, or at least needs to include the
345347
* message from the causing exception.
@@ -576,7 +578,7 @@ public Result execute(Request kvRequest) {
576578
serialVersionUsed = writeContent(buffer, kvRequest);
577579

578580
/*
579-
* If on-premise the authProvider will always be a
581+
* If on-premises the authProvider will always be a
580582
* StoreAccessTokenProvider. If so, check against
581583
* configurable limit. Otherwise check against internal
582584
* hardcoded cloud limit.
@@ -948,7 +950,7 @@ private RateLimiter getQueryRateLimiter(Request request, boolean read) {
948950
}
949951

950952
/**
951-
* Comsume rate limiter units after successful operation.
953+
* Consume rate limiter units after successful operation.
952954
* @return the number of milliseconds delayed due to rate limiting
953955
*/
954956
private int consumeLimiterUnits(RateLimiter rl,
@@ -961,7 +963,7 @@ private int consumeLimiterUnits(RateLimiter rl,
961963
/*
962964
* The logic consumes units (and potentially delays) _after_ a
963965
* successful operation for a couple reasons:
964-
* 1) We don't know the actual number of units an op uses unitl
966+
* 1) We don't know the actual number of units an op uses until
965967
* after the operation successfully finishes
966968
* 2) Delaying after the op keeps the application from immediately
967969
* trying the next op and ending up waiting along with other
@@ -1105,7 +1107,7 @@ final Result processResponse(HttpResponseStatus status,
11051107
*
11061108
* @return the result of processing the successful request
11071109
*
1108-
* @throws IOException if the stream could not be read for some reason
1110+
* @throws NoSQLException if the stream could not be read for some reason
11091111
*/
11101112
Result processOKResponse(ByteInputStream in, Request kvRequest) {
11111113
try {
@@ -1547,9 +1549,9 @@ void doRefresh(long refreshMs) {
15471549
/**
15481550
* Look for the compartment,table combination in the list. If
15491551
* present, do nothing. If not, add that combination to the list.
1550-
* This is not particular efficient but it is not expected that a given
1552+
* This is not particularly efficient but it is not expected that a given
15511553
* handle will be accessing a large number of tables.
1552-
*
1554+
* <p>
15531555
* The operation type is not checked -- all 3 types of requests are created
15541556
* no matter the access. This simplifies the logic and if a given type is
15551557
* not given to this Principal it doesn't hurt.

driver/src/main/java/oracle/nosql/driver/httpclient/HttpClient.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,30 @@
3636
import io.netty.util.concurrent.Future;
3737
/*
3838
* If this code is ever made generic, the proxy information obtained
39-
* from this config needs to be be abstracted to a generic class.
39+
* from this config needs to be abstracted to a generic class.
4040
*/
4141
import oracle.nosql.driver.NoSQLHandleConfig;
4242

4343
/**
4444
* Netty HTTP client. Initialization process:
45-
*
46-
* 1. create event loop for handling connections and requests. Assign it
47-
* a number of threads.
48-
* 2. bootstrap a client, setting the event loop group, socket options, and
49-
* remote address.
50-
* 3. create a ChannelPoolHandler instance to handle callback events from
45+
* <p>
46+
* <ol>
47+
* <li>create event loop for handling connections and requests. Assign it
48+
* a number of threads.</li>
49+
* <li>bootstrap a client, setting the event loop group, socket options, and
50+
* remote address.</li>
51+
* <li>create a ChannelPoolHandler instance to handle callback events from
5152
* a ChannelPool. The pool is used to allow the client to create new
5253
* connections on demand if one is busy. HTTP/1.1 doesn't allow concurrent
5354
* use of a single connection. This handler must be prepared to initialize
54-
* each new connection on creation.
55-
* 4. create a ChannelPool instance used to acquire and release channels for
56-
* use by requests.
57-
*
55+
* each new connection on creation.</li>
56+
* <li>create a ChannelPool instance used to acquire and release channels for
57+
* use by requests.</li>
58+
* </ol>
59+
* <p>
5860
* Using the client to send request and get a synchronous response. The
5961
* request must be an instance of HttpRequest:
60-
*
62+
* <p>
6163
* 1. Get a Channel.
6264
* Channel channel = client.getChannel(timeoutMs);
6365
* 2. Create a ResponseHandler to handle a response.

0 commit comments

Comments
 (0)