Package oracle.nosql.driver.ops

## Class Request

- java.lang.Object
- - oracle.nosql.driver.ops.Request

- Direct Known Subclasses:
    `DeleteRequest`, `GetIndexesRequest`, `GetRequest`, `GetTableRequest`, `ListTablesRequest`, `MultiDeleteRequest`, `PrepareRequest`, `PutRequest`, `QueryRequest`, `SystemRequest`, `SystemStatusRequest`, `TableRequest`, `TableUsageRequest`, `WriteMultipleRequest`

      public abstract class Request
      extends Object

  A request is an abstract class used as a base for all requests types. Public state and methods are implemented by extending classes.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getCompartment()` | Returns the compartment id or name.
    `RateLimiter` | `getReadRateLimiter()` | Returns the read rate limiter instance used during this request.
    `RetryStats` | `getRetryStats()` | Returns a stats object with information about retries.
    `String` | `getTableName()` | Returns the table name to use for the operation.
    `RateLimiter` | `getWriteRateLimiter()` | Returns the write rate limiter instance used during this request.
    `void` | `setReadRateLimiter​(RateLimiter rl)` | Sets a read rate limiter to use for this request.
    `void` | `setWriteRateLimiter​(RateLimiter rl)` | Sets a write rate limiter to use for this request.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getCompartment

          public String getCompartment()

      Returns the compartment id or name. Cloud service only.
      Returns:
        compartment id or name if set for the request

    - #### getTableName

          public String getTableName()

      Returns the table name to use for the operation.
      Returns:
        the table name, or null if not set

    - #### setReadRateLimiter

          public void setReadRateLimiter​(RateLimiter rl)

      Sets a read rate limiter to use for this request. Cloud service only.

      This will override any internal rate limiter that may have otherwise been used during request processing, and it will be used regardless of any rate limiter config.

      Parameters:
        `rl` - the rate limiter instance to use for read operations

    - #### setWriteRateLimiter

          public void setWriteRateLimiter​(RateLimiter rl)

      Sets a write rate limiter to use for this request. Cloud service only.

      This will override any internal rate limiter that may have otherwise been used during request processing, and it will be used regardless of any rate limiter config.

      Parameters:
        `rl` - the rate limiter instance to use for write operations

    - #### getReadRateLimiter

          public RateLimiter getReadRateLimiter()

      Returns the read rate limiter instance used during this request. Cloud service only.

      This will be the value supplied via `setReadRateLimiter(oracle.nosql.driver.RateLimiter)`, or if that was not called, it may be an instance of an internal rate limiter that was configured internally during request processing.

      This is supplied for stats and tracing/debugging only. The returned limiter should be treated as read-only.

      Returns:
        the rate limiter instance used for read operations, or null if no limiter was used.

    - #### getWriteRateLimiter

          public RateLimiter getWriteRateLimiter()

      Returns the write rate limiter instance used during this request. Cloud service only.

      This will be the value supplied via `setWriteRateLimiter(oracle.nosql.driver.RateLimiter)`, or if that was not called, it may be an instance of an internal rate limiter that was configured internally during request processing.

      This is supplied for stats and tracing/debugging only. The returned limiter should be treated as read-only.

      Returns:
        the rate limiter instance used for write operations, or null if no limiter was used.

    - #### getRetryStats

          public RetryStats getRetryStats()

      Returns a stats object with information about retries. This may be used during a retry handler or after a request has completed or thrown an exception.
      Returns:
        stats object with retry information, or null if no retries were performed.