Package com.mongodb

Class MongoNotPrimaryException

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated(since="2021-05-27")
    public class MongoNotPrimaryException
    extends MongoCommandException
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    An exception indicating that the server is a member of a replica set but is not the primary, and therefore refused to execute either a write operation or a read operation that required a primary. This can happen during a replica set election.
    Since:
    3.0
    See Also:
    Serialized Form
    • Constructor Detail

      • MongoNotPrimaryException

        public MongoNotPrimaryException​(BsonDocument response,
                                        ServerAddress serverAddress)
        Deprecated.
        Construct an instance.
        Parameters:
        response - the full response from the server
        serverAddress - the address of the server
        Since:
        3.8