Package com.mongodb
Class MongoStalePrimaryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoStalePrimaryException
- All Implemented Interfaces:
Serializable
Exception thrown when a replica set primary is identified as a stale primary during Server Discovery and Monitoring (SDAM).
This occurs when a new primary is discovered, causing the previously known primary to be marked stale, typically during network
partitions or elections.
- Since:
- 5.6
- See Also:
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
Constructors -
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
-
MongoStalePrimaryException
Construct an instance.- Parameters:
message
- the exception message.
-