oracle.kv

## Class RequestTimeoutException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - oracle.kv.FaultException
        - - oracle.kv.RequestTimeoutException

- All Implemented Interfaces:
    Serializable

      public class RequestTimeoutException
      extends FaultException

  Thrown when a request cannot be processed because the configured timeout interval is exceeded.

  The default timeout interval (specified by `KVStoreConfig.getRequestTimeout(java.util.concurrent.TimeUnit)`) is five seconds, and this exception should rarely be thrown.

  Note that the durability of an update operation is uncertain if it results in a `RequestTimeoutException` being thrown. The changes requested by the update may or may not have been committed to the master or propagated to one or more replicas. Applications may want to retry the update operation if it is idempotent, or perform read operations to determine the outcome of the previous update.

  Note also that if the consistency specified for a read operation is `Consistency.NONE_REQUIRED_NO_MASTER`, then this exception will be thrown if the operation is attempted when the only node available is the Master.

  Depending on the nature of the application, when this exception is thrown the client may wish to

  - retry the operation,
  - fall back to using a larger timeout interval, and resume using the original timeout interval at a later time, or
  - give up and report an error at a higher level.
  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMessage()`
    `int` | `getTimeoutMs()` Returns the timeout that was in effect for the operation.
    `void` | `setTimeoutMs(int timeoutMs)` Sets the timeout that was in effect for the operation.

    - ### Methods inherited from class oracle.kv.FaultException

      `getFaultClassName, getRemoteStackTrace, toString, wasLoggedRemotely`

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

      `fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

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

- - ### Method Detail

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

    - #### getTimeoutMs

          public int getTimeoutMs()

      Returns the timeout that was in effect for the operation.

    - #### setTimeoutMs

          public void setTimeoutMs(int timeoutMs)

      Sets the timeout that was in effect for the operation.

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.