Package oracle.kv.stats

# Class KVStats

java.lang.Object
oracle.kv.stats.KVStats

All Implemented Interfaces:
  `Serializable`

public class KVStats extends Object implements Serializable
Statistics associated with accessing the KVStore from a client via the KVStore handle. These statistics are from the client's perspective and can therefore vary from client to client depending on the configuration and load on a specific client as well as the network path between the client and the nodes in the KVStore.

See Also:
  - `KVStore.getStats(boolean)`
  - Serialized Form

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<NodeMetrics>`
  `getNodeMetrics()`
  Returns the metrics associated with each node in the KVStore.
  `List<OperationMetrics>`
  `getOpMetrics()`
  Returns a list of metrics associated with each operation supported by KVStore.
  `long`
  `getRequestRetryCount()`
  Returns the total number of times requests were retried.
  `StoreIteratorMetrics`
  `getStoreIteratorMetrics()`
  Deprecated.
  since 3.4, no longer supported.
  `String`
  `toString()`
  Returns a descriptive string, conforming to the json syntax.

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

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

- ## Method Details

  - ### getOpMetrics

    public List<OperationMetrics> getOpMetrics()
    Returns a list of metrics associated with each operation supported by KVStore. The following table lists the method names and the name associated with it by the `OperationMetrics.getOperationName()`.

    It's worth noting that the metrics related to the Iterator methods are special, since each use of an iterator call may result in multiple underlying operations depending upon the `batchSize` used for the iteration.

    List of operations and associated metrics
    `KVStore.delete(oracle.kv.Key)`, `TableAPI.delete(oracle.kv.table.PrimaryKey, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | delete
    `KVStore.deleteIfVersion(oracle.kv.Key, oracle.kv.Version)`, `TableAPI.deleteIfVersion(oracle.kv.table.PrimaryKey, oracle.kv.Version, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | deleteIfVersion
    `KVStore.execute(java.util.List<oracle.kv.Operation>)`, `TableAPI.execute(java.lang.String)` | execute
    `KVStore.get(oracle.kv.Key)`, `TableAPI.get(oracle.kv.table.PrimaryKey, oracle.kv.table.ReadOptions)` | get
    `KVStore.multiDelete(oracle.kv.Key, oracle.kv.KeyRange, oracle.kv.Depth)`, `TableAPI.multiDelete(oracle.kv.table.PrimaryKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.WriteOptions)` | multiDelete
    `KVStore.multiGet(oracle.kv.Key, oracle.kv.KeyRange, oracle.kv.Depth)`, `TableAPI.multiGet(oracle.kv.table.PrimaryKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.ReadOptions)` | multiGet
    `KVStore.multiGetIterator(oracle.kv.Direction, int, oracle.kv.Key, oracle.kv.KeyRange, oracle.kv.Depth)` | multiGetIterator
    `KVStore.multiGetKeys(oracle.kv.Key, oracle.kv.KeyRange, oracle.kv.Depth)`, `TableAPI.multiGetKeys(oracle.kv.table.PrimaryKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.ReadOptions)` | multiGetKeys
    `KVStore.multiGetKeysIterator(oracle.kv.Direction, int, oracle.kv.Key, oracle.kv.KeyRange, oracle.kv.Depth)` | multiGetKeysIterator
    `KVStore.put(oracle.kv.Key, oracle.kv.Value)`, `TableAPI.put(oracle.kv.table.Row, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | put
    `KVStore.putIfAbsent(oracle.kv.Key, oracle.kv.Value)`, `TableAPI.putIfAbsent(oracle.kv.table.Row, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | putIfAbsent
    `KVStore.putIfPresent(oracle.kv.Key, oracle.kv.Value)`, `TableAPI.putIfPresent(oracle.kv.table.Row, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | putIfPresent
    `KVStore.putIfVersion(oracle.kv.Key, oracle.kv.Value, oracle.kv.Version)`, `TableAPI.putIfVersion(oracle.kv.table.Row, oracle.kv.Version, oracle.kv.table.ReturnRow, oracle.kv.table.WriteOptions)` | putIfVersion
    `KVStore.storeIterator(oracle.kv.Direction, int)`, `TableAPI.tableIterator(oracle.kv.table.PrimaryKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.TableIteratorOptions)` | storeIterator
    `KVStore.storeKeysIterator(oracle.kv.Direction, int)`, `TableAPI.tableKeysIterator(oracle.kv.table.PrimaryKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.TableIteratorOptions)` | storeKeysIterator
    `TableAPI.tableIterator(oracle.kv.table.IndexKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.TableIteratorOptions)` | indexIterator
    `TableAPI.tableKeysIterator(oracle.kv.table.IndexKey, oracle.kv.table.MultiRowOptions, oracle.kv.table.TableIteratorOptions)` | indexKeysIterator

    Returns:
      the list of metrics. One for each of the operations listed above.

  - ### toString

    public String toString()
    Returns a descriptive string, conforming to the json syntax.
    Overrides:
      `toString` in class `Object`

  - ### getNodeMetrics

    public List<NodeMetrics> getNodeMetrics()
    Returns the metrics associated with each node in the KVStore.
    Returns:
      a list containing one entry for each node in the KVStore.

  - ### getStoreIteratorMetrics

    @Deprecated public StoreIteratorMetrics getStoreIteratorMetrics()
    Deprecated.
    since 3.4, no longer supported. All of the methods of the returned StoreIteratorMetrics object will return 0.

  - ### getRequestRetryCount

    public long getRequestRetryCount()
    Returns the total number of times requests were retried. A single user-level request may be retried transparently at one or more nodes until the request succeeds or it times out. This count reflects those retry operations.
    See Also:
      - `KVStoreConfig.getRequestTimeout(TimeUnit)`