Package oracle.nosql.driver.ops

## Class ListTablesRequest

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

-     public class ListTablesRequest
      extends Request

  Represents the argument of a `NoSQLHandle.listTables(oracle.nosql.driver.ops.ListTablesRequest)` operation which lists all available tables associated with the identity associated with the handle used for the operation. If the list is large it can be paged by using the startIndex and limit parameters. The list is returned in a simple array in `ListTablesResult`. Names are returned sorted in alphabetical order in order to facilitate paging.
  See Also:
    `NoSQLHandle.listTables(oracle.nosql.driver.ops.ListTablesRequest)`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ListTablesRequest()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getLimit()` | Returns the maximum number of table names to return in the operation.
    `String` | `getNamespace()` | On-premise only.
    `int` | `getStartIndex()` | Returns the index to use to start returning table names.
    `ListTablesRequest` | `setCompartment​(String compartment)` | Cloud service only.
    `ListTablesRequest` | `setLimit​(int limit)` | Sets the maximum number of table names to return in the operation.
    `ListTablesRequest` | `setNamespace​(String namespace)` | On-premise only.
    `ListTablesRequest` | `setStartIndex​(int startIndex)` | Sets the index to use to start returning table names.
    `ListTablesRequest` | `setTimeout​(int timeoutMs)` | Sets the request timeout value, in milliseconds.

    - ### Methods inherited from class oracle.nosql.driver.ops.Request

      `getCompartment, getReadRateLimiter, getRetryStats, getTableName, getWriteRateLimiter, setReadRateLimiter, setWriteRateLimiter`

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

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

- - ### Constructor Detail

    - #### ListTablesRequest

          public ListTablesRequest()

  - ### Method Detail

    - #### setCompartment

          public ListTablesRequest setCompartment​(String compartment)

      Cloud service only.

      Sets the name or id of a compartment to be used for this operation.

      The compartment may be specified as either a name (or path for nested compartments) or as an id (OCID). A name (vs id) can only be used when authenticated using a specific user identity. It is not available if authenticated as an Instance Principal which can be done when calling the service from a compute instance in the Oracle Cloud Infrastructure. See `SignatureProvider.createWithInstancePrincipal()`

      Parameters:
        `compartment` - the name or id. If using a nested compartment, specify the full compartment path `compartmentA.compartmentB`, but exclude the name of the root compartment (tenant).
      Returns:
        this

    - #### getLimit

          public int getLimit()

      Returns the maximum number of table names to return in the operation. If not set (0) there is no application-imposed limit.
      Returns:
        the maximum number of tables to return in a single request

    - #### getStartIndex

          public int getStartIndex()

      Returns the index to use to start returning table names. This is related to the `ListTablesResult.getLastReturnedIndex()` from a previous request and can be used to page table names. If not set, the list starts at index 0.
      Returns:
        the start index.

    - #### setLimit

          public ListTablesRequest setLimit​(int limit)

      Sets the maximum number of table names to return in the operation. If not set (0) there is no limit.
      Parameters:
        `limit` - the maximum number of tables
      Returns:
        this

    - #### setStartIndex

          public ListTablesRequest setStartIndex​(int startIndex)

      Sets the index to use to start returning table names. This is related to the `ListTablesResult.getLastReturnedIndex()` from a previous request and can be used to page table names. If not set, the list starts at index 0.
      Parameters:
        `startIndex` - the start index
      Returns:
        this

    - #### setTimeout

          public ListTablesRequest setTimeout​(int timeoutMs)

      Sets the request timeout value, in milliseconds. This overrides any default value set in `NoSQLHandleConfig`. The value must be positive.
      Parameters:
        `timeoutMs` - the timeout value, in milliseconds
      Returns:
        this
      Throws:
        `IllegalArgumentException` - if the timeout value is less than or equal to 0

    - #### setNamespace

          public ListTablesRequest setNamespace​(String namespace)

      On-premise only.

      Sets the namespace to use for the list. If not set all tables accessible to the user will be returned. If set, only tables in the namespace provided are returned.

      Parameters:
        `namespace` - the namespace to use
      Returns:
        this

    - #### getNamespace

          public String getNamespace()

      On-premise only.

      Returns the namespace to use for the list or null if not set.

      Returns:
        the namespace