Package com.mongodb

Class MongoWriteConcernException

    • Constructor Detail

      • MongoWriteConcernException

        public MongoWriteConcernException(WriteConcernError writeConcernError,
                                          ServerAddress serverAddress)
        Construct an instance.
        Parameters:
        writeConcernError - the non-null write concern error
        serverAddress - the non-null server address
      • MongoWriteConcernException

        public MongoWriteConcernException(WriteConcernError writeConcernError,
                                          @Nullable
                                          WriteConcernResult writeConcernResult,
                                          ServerAddress serverAddress)
        Construct an instance.
        Parameters:
        writeConcernError - the non-null write concern error
        writeConcernResult - the write result
        serverAddress - the non-null server address
        Since:
        3.2
    • Method Detail

      • getWriteConcernError

        public WriteConcernError getWriteConcernError()
        Gets the write concern error.
        Returns:
        the write concern error, which may not be null
      • getWriteResult

        public WriteConcernResult getWriteResult()
        Gets the write result.
        Returns:
        the write result
        Since:
        3.2