Class MongoOperationTimeoutException
- All Implemented Interfaces:
Serializable
The MongoOperationTimeoutException
might provide information about the underlying
cause of the timeout, if available. For example, if retries are attempted due to transient failures,
and a timeout occurs in any of the attempts, the exception from one of the retries may be appended
as the cause to this MongoOperationTimeoutException
.
The key difference between MongoOperationTimeoutException
and MongoExecutionTimeoutException
lies in the nature of these exceptions. MongoExecutionTimeoutException
indicates a server-side timeout
capped by a user-specified number. These server errors are transformed into the new MongoOperationTimeoutException
.
On the other hand, MongoOperationExecutionException
denotes a timeout during the execution of the entire operation.
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
ConstructorDescriptionMongoOperationTimeoutException
(String message) Construct a new instance.MongoOperationTimeoutException
(String message, Throwable cause) Construct a new instance -
Method Summary
Methods inherited from class com.mongodb.MongoException
addLabel, addLabels, addLabels, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MongoOperationTimeoutException
Construct a new instance.- Parameters:
message
- the message
-
MongoOperationTimeoutException
Construct a new instance- Parameters:
message
- the messagecause
- the cause
-