Package com.mongodb

Class BulkWriteException



  • public class BulkWriteException
    extends com.mongodb.MongoServerException
    An exception that represents all errors associated with a bulk write operation.
    Since:
    2.12
    See Also:
    Serialized Form
    MongoDB documentation
    BulkWriteResult.writeErrors
    Since server release
    2.6
    • Field Summary

      • Fields inherited from class com.mongodb.MongoException

        TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      WriteConcernError getWriteConcernError​()
      The write concern error, which may be null (in which case the list of errors will not be empty).
      java.util.List<BulkWriteError> getWriteErrors​()
      The list of errors, which will not be null, but may be empty (if the write concern error is not null).
      BulkWriteResult getWriteResult​()
      The result of all successfully processed write operations.
      int hashCode​()  
      • Methods inherited from class com.mongodb.MongoException

        addLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
      • Methods inherited from class com.mongodb.MongoServerException

        getServerAddress
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
    • Method Detail

      • getWriteResult

        public BulkWriteResult getWriteResult​()
        The result of all successfully processed write operations. This will never be null.
        Returns:
        the bulk write result
      • getWriteErrors

        public java.util.List<BulkWriteError> getWriteErrors​()
        The list of errors, which will not be null, but may be empty (if the write concern error is not null).
        Returns:
        the list of errors
      • getWriteConcernError

        public WriteConcernError getWriteConcernError​()
        The write concern error, which may be null (in which case the list of errors will not be empty).
        Returns:
        the write concern error
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object