Package com.mongodb
Class MongoInterruptedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoInterruptedException
- All Implemented Interfaces:
Serializable
A driver-specific non-checked counterpart to
InterruptedException
.
Before this exception is thrown, the interrupt status of the thread will have been set
unless the cause is InterruptedIOException
, in which case the driver leaves the status as is.
The Java SE API uses exceptions different from InterruptedException
to communicate the same information:
InterruptibleChannel
usesClosedByInterruptException
.Socket.connect(SocketAddress)
, InputStream/OutputStream
obtained viaSocket.getInputStream()
/Socket.getOutputStream()
use eitherClosedByInterruptException
orSocketException
.- There is also
InterruptedIOException
, which is documented to an extent as an IO-specific counterpart toInterruptedException
.
MongoInterruptedException
where relevant.- See Also:
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
ConstructorDescriptionMongoInterruptedException
(String message, Exception e) 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
-
MongoInterruptedException
Construct a new instance.- Parameters:
message
- the messagee
- the cause
-