SStatsConfig (Oracle - Berkeley DB Client-Server API)
Date: 2018-05-29

com.sleepycat.client

## Class SStatsConfig

- java.lang.Object
- - com.sleepycat.client.SStatsConfig

-     public class SStatsConfig
      extends java.lang.Object

  Specifies the attributes of a statistics retrieval operation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SStatsConfig()` Create a default SStatsConfig.
    `SStatsConfig(boolean clear, boolean fast)` Create a SStatsConfig with the specified attributes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getClear()` Return if the statistics operation is configured to reset statistics after they are returned.
    `boolean` | `getFast()` Return if the statistics operation is configured to return only the values which do not require expensive actions.
    `SStatsConfig` | `setClear(boolean clear)` Configure the statistics operation to reset statistics after they are returned.
    `SStatsConfig` | `setFast(boolean fast)` Configure the statistics operation to return only the values which do not incur some performance penalty.

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

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

- - ### Constructor Detail

    - #### SStatsConfig

          public SStatsConfig()

      Create a default SStatsConfig.

    - #### SStatsConfig

          public SStatsConfig(boolean clear,
                              boolean fast)

      Create a SStatsConfig with the specified attributes.
      Parameters:
        `clear` - if the statistic operation will reset statistics after they are returned
        `fast` - if the statistic operation will return only the values which do not incur some performance penalty

  - ### Method Detail

    - #### getClear

          public boolean getClear()

      Return if the statistics operation is configured to reset statistics after they are returned.
      Returns:
        if the statistics operation is configured to reset statistics after they are returned.

    - #### setClear

          public SStatsConfig setClear(boolean clear)

      Configure the statistics operation to reset statistics after they are returned.
      Parameters:
        `clear` - if set to true, configure the statistics operation to reset statistics after they are returned.
      Returns:
        this

    - #### getFast

          public boolean getFast()

      Return if the statistics operation is configured to return only the values which do not require expensive actions.
      Returns:
        if the statistics operation is configured to return only the values which do not require expensive actions.

    - #### setFast

          public SStatsConfig setFast(boolean fast)

      Configure the statistics operation to return only the values which do not incur some performance penalty.

      For example, skip stats that require a traversal of the database or in-memory tree, or which lock down the lock table for a period of time.

      Among other things, this flag makes it possible for applications to request key and record counts without incurring the performance penalty of traversing the entire database. If the underlying database is of type Recno, or of type Btree and the database was configured to support retrieval by record number, the count of keys will be exact. Otherwise, the count of keys will be the value saved the last time the database was traversed, or 0 if no count of keys has ever been made. If the underlying database is of type Recno, the count of data items will be exact, otherwise, the count of data items will be the value saved the last time the database was traversed, or 0 if no count of data items has ever been done.

      Parameters:
        `fast` - if set to true, configure the statistics operation to return only the values which do not incur some performance penalty.
      Returns:
        this

Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.