Class NoSQLConfig
Represents configuration required to instantiate
NoSQLClient instance.
Inherited Members
Namespace: Oracle.NoSQL.SDK
Assembly: Oracle.NoSQL.SDK.dll
Syntax
public class NoSQLConfig
Remarks
This class contains properties that are needed to create and configure NoSQLClient instance. Some properties are needed in order to establish the connection with the NoSQL service and their values are required to be provided. Most of the other properties serve as defaults for various options passed to NoSQLClient APIs. They are optional and have their own default values.
The configuration may be stored in JSON format as a string or in a file and you may construct NoSQLClient instance by providing a path to a JSON file storing the configuration (see NoSQLClient(string)). NoSQLConfig instance is represented as JSON object using the following rules:
- In general, every property is represented as JSON field with the field name being the same as the property name and the field value being the property value, unless otherwise specified in a documentation for a particular property.
- The field names are matched in a case-insensitive manner.
- Enumeration values are represented as string values of the corresponding enumeration constants, the match being case-insensitive, unless otherwise specified.
- Each TimeSpan value is represented as the number of milliseconds.
- Complex property values of properties such as RetryHandler and AuthorizationProvider are represented as JSON objects with the same rules as above applying within each such object.
Examples
Initializing NoSQLConfig instance.var config = new NoSQLConfig
{
ServiceType = ServiceType.Cloud,
Region = Region.AP_MUMBAI_1,
Timeout = TimeSpan.FromSeconds(15),
RetryHandler = new NoSQLRetryHandler
{
MaxRetryAttempts = 20,
BaseDelay = TimeSpan.FromSeconds(2),
ControlOperationBaseDelay = TimeSpan.FromMinutes(2)
},
AuthorizationProvider = new IAMAuthorizationProvider(
"~/my_app/.oci/config", "Jane")
};
Representing NoSQLConfig instance in JSON. This is the
same configuration as in the first example.
{
"ServiceType": "Cloud",
"Region": "AP_MUMBAI_1",
"Timeout": 15000,
"RetryHandler": {
"MaxRetryAttempts": 20,
"BaseDelay": 2000,
"ControlOperationBaseDelay": 120000
},
"AuthorizationType": "IAM",
"AuthorizationProvider": {
"ConfigFile": "~/my_app/.oci/config",
"ProfileName": "Jane"
}
}
Fields
| Name | Description |
|---|---|
| NoRetries | Retry handler instance that disables all operation retries. |
Properties
| Name | Description |
|---|---|
| AdminPollDelay | Gets or sets the delay between successive polls when waiting for completion of an DDL operation. |
| AdminPollTimeout | Gets or sets the timeout to wait for completion of an admin DDL operation. |
| AdminTimeout | Gets or sets a timeout for admin DDL operations. |
| AuthorizationProvider | Gets or sets the authorization provider. |
| Compartment | Cloud service only. Gets or sets a compartment id or a compartment name for operations with this NoSQLClient instance. |
| ConnectionOptions | Gets or sets network connection options. |
| Consistency | Gets or sets a Consistency used for read operations. |
| Durability | On-Premise only. Gets or sets a Durability used for write operations. |
| Endpoint | Gets or sets the endpoint to use to connect to Oracle NoSQL Database Service. |
| MaxMemoryMB | Gets or sets the maximum amount of memory in megabytes that can be used by the driver-side portion of a query. |
| Namespace | On-premises only. Gets or sets the default namespace for operations with this NoSQLClient instance. |
| RateLimiterCreator | For Cloud Service or Cloud Simulator only. Gets or sets a delegate used to create custom rate limiter instances. |
| RateLimiterPercent | For Cloud Service or Cloud Simulator only. Gets or sets the percentage of table limits used for rate limiting. |
| RateLimitingEnabled | For Cloud Service or Cloud Simulator only. Gets or sets the value that determines whether to enable rate limiting based on table limits. |
| Region | Cloud Service Only. Gets or sets a region to use to connect to the Oracle NoSQL Database Cloud Service. |
| RetryHandler | Gets or sets the handler for operation retries. |
| ServiceType | Gets or sets the type of Oracle NoSQL service to use. |
| StatsEnableLog | Gets or sets whether statistics snapshots are written to StatsLogger. |
| StatsHandler | Gets or sets the handler invoked with each generated statistics snapshot. |
| StatsInterval | Gets or sets the interval for periodic statistics snapshots. |
| StatsLogger | Gets or sets the logger used for statistics log output. |
| StatsPrettyPrint | Gets or sets whether statistics JSON is pretty-printed. |
| StatsProfile | Gets or sets the statistics collection profile. |
| TableDDLTimeout | Gets or sets a timeout for table DDL operations. |
| TablePollDelay | Gets or sets the delay between successive polls when waiting for completion of a table DDL operation. |
| TablePollTimeout | Gets or sets the timeout to wait for completion of a table DDL operation. |
| Timeout | Gets or sets a timeout for non-DDL operations. |
Methods
| Name | Description |
|---|---|
| FromJsonFile(string) | Creates an instance of NoSQLConfig from a JSON file. |
| FromJsonString(string) | Creates an instance of NoSQLConfig from a JSON string. |