Package oracle.kv.table

# Class TableIteratorOptions

java.lang.Object
oracle.kv.table.ReadOptions
oracle.kv.table.TableIteratorOptions

public class TableIteratorOptions extends ReadOptions
TableIteratorOptions extends ReadOptions and is passed to read-only store operations that return iterators. It is used to specify non-default behavior. Default behavior is configured when a store is opened using `KVStoreConfig`.

Since:
  3.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit)`
  Creates a `TableIteratorOptions` with the specified parameters.
  `TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit, int maxConcurrentRequests, int batchResultsSize)`
  Creates a `TableIteratorOptions` with the specified parameters, including `maxConcurrentRequests` and `batchResultsSize` values.
  `TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit, int maxConcurrentRequests, int batchResultsSize, int maxResultsBatches)`
  Deprecated.
  since 3.4, no longer supported.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Direction`
  `getDirection()`
  Returns the direction.
  `int`
  `getMaxConcurrentRequests()`
  Returns the maximum number of concurrent requests, or `0` if no maximum was specified.
  `int`
  `getMaxResultsBatches()`
  Deprecated.
  since 3.4, no longer supported.
  `int`
  `getResultsBatchSize()`
  Returns the number of results per request, or `0` if no value was specified.

  ### Methods inherited from class oracle.kv.table.ReadOptions

  `getConsistency, getTimeout, getTimeoutUnit`

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

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

- ## Constructor Details

  - ### TableIteratorOptions

    public TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit)
    Creates a `TableIteratorOptions` with the specified parameters. Equivalent to `TableIteratorOptions(direction, consistency, timeout, timeoutUnit, 0, 0)`.
    Parameters:
      `direction` - a direction
      `consistency` - the read consistency or null
      `timeout` - the request timeout or 0
      `timeoutUnit` - the `TimeUnit` for the `timeout` parameter or null
    Throws:
      `IllegalArgumentException` - if direction is null, the timeout is negative, or timeout is > 0 and timeoutUnit is null

  - ### TableIteratorOptions

    public TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit, int maxConcurrentRequests, int batchResultsSize)
    Creates a `TableIteratorOptions` with the specified parameters, including `maxConcurrentRequests` and `batchResultsSize` values.

    If `consistency` is `null`, the `default consistency` is used. If `timeout` is zero the `default request timeout` is used.

    `maxConcurrentRequests` specifies the maximum degree of parallelism to be used when running an iteration. Setting `maxConcurrentRequests` to 1 causes the iteration to be performed using only a single thread. Setting it to 0 lets the KV Client determine the degree of concurrency based on topology information (up to a maximum of the number of available processors as returned by java.lang.Runtime.availableProcessors()). Values less than 0 cause an `IllegalArgumentException` to be thrown.

    Parameters:
      `direction` - a direction
      `consistency` - the read consistency or null
      `timeout` - the request timeout or 0
      `timeoutUnit` - the `TimeUnit` for the `timeout` parameter or null
      `maxConcurrentRequests` - the maximum number of concurrent requests
      `batchResultsSize` - the number of results per request
    Throws:
      `IllegalArgumentException` - if direction is null, the timeout is negative, timeout is > 0 and timeoutUnit is null, or maxConcurrentRequests or batchResultsSize is less than 0
    Since:
      3.4

  - ### TableIteratorOptions

    @Deprecated public TableIteratorOptions(Direction direction, Consistency consistency, long timeout, TimeUnit timeoutUnit, int maxConcurrentRequests, int batchResultsSize, int maxResultsBatches)
    Deprecated.
    since 3.4, no longer supported. replaced by `TableIteratorOptions(Direction, Consistency, long, TimeUnit, int, int)`

- ## Method Details

  - ### getDirection

    public Direction getDirection()
    Returns the direction.
    Returns:
      the direction

  - ### getMaxConcurrentRequests

    public int getMaxConcurrentRequests()
    Returns the maximum number of concurrent requests, or `0` if no maximum was specified.
    Returns:
      the maximum number of concurrent requests or `0`

  - ### getResultsBatchSize

    public int getResultsBatchSize()
    Returns the number of results per request, or `0` if no value was specified.
    Returns:
      the number of results or `0`

  - ### getMaxResultsBatches

    @Deprecated public int getMaxResultsBatches()
    Deprecated.
    since 3.4, no longer supported. Returns zero.
    Returns:
      zero