Serializable
public class MongoWriteConcernException extends MongoServerException
WriteConcern
,
Serialized FormTRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
Constructor | Description |
---|---|
MongoWriteConcernException(WriteConcernError writeConcernError,
ServerAddress serverAddress) |
Construct an instance.
|
MongoWriteConcernException(WriteConcernError writeConcernError,
WriteConcernResult writeConcernResult,
ServerAddress serverAddress) |
Construct an instance.
|
Modifier and Type | Method | Description |
---|---|---|
WriteConcernError |
getWriteConcernError() |
Gets the write concern error.
|
WriteConcernResult |
getWriteResult() |
Gets the write result.
|
addLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
getServerAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MongoWriteConcernException(WriteConcernError writeConcernError, ServerAddress serverAddress)
writeConcernError
- the non-null write concern errorserverAddress
- the non-null server addresspublic MongoWriteConcernException(WriteConcernError writeConcernError, @Nullable WriteConcernResult writeConcernResult, ServerAddress serverAddress)
writeConcernError
- the non-null write concern errorwriteConcernResult
- the write resultserverAddress
- the non-null server addresspublic WriteConcernError getWriteConcernError()
public WriteConcernResult getWriteResult()