Package oracle.nosql.driver

# Class Consistency

java.lang.Object
oracle.nosql.driver.Consistency

public class Consistency extends Object
Consistency is used to provide consistency guarantees for read operations.

`ABSOLUTE` consistency may be specified to guarantee that current values are read. `EVENTUAL` consistency means that the values read may be very slightly out of date. `ABSOLUTE` consistency results in higher cost, consuming twice the number of read units for the same data relative to `EVENTUAL` consistency, and should only be used when required.

It is possible to set a default Consistency for a `NoSQLHandle` instance by using `NoSQLHandleConfig.setConsistency(oracle.nosql.driver.Consistency)`. If no Consistency is specified in an operation and there is no default value, `EVENTUAL` is used.

Consistency can be specified as an optional argument to all read operations.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `Consistency.Type`
  Consistency types

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static Consistency`
  `ABSOLUTE`
  constant for ABSOLUTE Consistency
  `static Consistency`
  `EVENTUAL`
  constant for EVENTUAL Consistency

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Consistency.Type`
  `getType()`
  Returns the `Consistency.Type` of Consistency
  `boolean`
  `isAbsolute()`
  Returns true if this is Consistency.ABSOLUTE
  `boolean`
  `isEventual()`
  Returns true if this is Consistency.EVENTUAL

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

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

- ## Field Details

  - ### ABSOLUTE

    public static Consistency ABSOLUTE
    constant for ABSOLUTE Consistency

  - ### EVENTUAL

    public static Consistency EVENTUAL
    constant for EVENTUAL Consistency

- ## Method Details

  - ### getType

    public Consistency.Type getType()
    Returns the `Consistency.Type` of Consistency
    Returns:
      the type

  - ### isAbsolute

    public boolean isAbsolute()
    Returns true if this is Consistency.ABSOLUTE
    Returns:
      true if this instance represents ABSOLUTE Consistency

  - ### isEventual

    public boolean isEventual()
    Returns true if this is Consistency.EVENTUAL
    Returns:
      true if this instance represents EVENTUAL Consistency