Class RequestTimeoutException
- All Implemented Interfaces:
Serializable,oracle.kv.impl.util.FastExternalizable
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 may be uncertain if it
results in a RequestTimeoutException being thrown. In most cases,
the exception means that 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.
In the case that an application receives a RequestTimeoutException whose cause is a DurabilityException and
calling DurabilityException.getNoSideEffects() returns true, the
application can safely assume that none of the changes requested by the
operation have been performed and can retry the operation. If
getNoSideEffects returns false, then the operation may or may not have had
side effects.
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:
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the timeout that was in effect for the operation.voidsetTimeoutMs(int timeoutMs) Sets the timeout that was in effect for the operation.toString()Returns a description of the fault that includes the standardThrowabledescription (class name and message), followed by the fault class name, followed by the remote stack trace (if any).Methods inherited from class oracle.kv.FaultException
getFaultClassName, getRemoteStackTrace, wasLoggedRemotelyMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface oracle.kv.impl.util.FastExternalizable
deserializedForm
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
toString
Description copied from class:FaultExceptionReturns a description of the fault that includes the standardThrowabledescription (class name and message), followed by the fault class name, followed by the remote stack trace (if any). This method exists primarily for logging, testing and debugging.- Overrides:
toStringin classFaultException
-
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.
-