Package com.mongodb

Class MongoStalePrimaryException

All Implemented Interfaces:
Serializable

public class MongoStalePrimaryException extends MongoException
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:
  • Constructor Details

    • MongoStalePrimaryException

      public MongoStalePrimaryException(String message)
      Construct an instance.
      Parameters:
      message - the exception message.