Package oracle.nosql.driver

Contains the public API for using the Oracle NoSQL Database as well as configuration and common parameter classes used in database operations. This package contains the major configuration and common operational classes and interfaces, as well as exception classes. Value classes used for data are in the values package. Request and result objects used for individual operations are in the ops package.

This and other packages in the system support both users of the Oracle NoSQL Database Cloud Service and the on-premise Oracle NoSQL Database. Some classes, methods, and parameters are specific to each environment. The documentation for affected classes and methods notes whether there are environment-specific considerations. Unless otherwise noted they are applicable to both environments. The differences mostly related to authentication models, encapsulated in AuthorizationProvider and resource constraints and limits in the Cloud Service that are not present on-premise.

The overall flow of a driver application is:

  1. Configure the handle to use, including the endpoint for the server to use. The configuration object, NoSQLHandleConfig, has additional configuration options.
  2. Use the configuration object to obtain a NoSQLHandle instance.
  3. All data operations are methods on NoSQLHandle. They all have the same pattern of:
    • Create and configure Request instance for the operations
    • Call the appropriate method on NoSQLHandle for the request
    • Process results in the Result object
    Errors are thrown as exceptions. Many exceptions specific to the system are instances of NoSQLException, but common Java exceptions such as IllegalArgumentException are thrown directly.

Instances of NoSQLHandle are thread-safe and intended to be shared in a multi-threaded application. They are associated 1:1 with an identity so they cannot be shared by different users. While they are not extremely expensive, they have a connection pool and thread pool and are not intended to be disposable.