Package com.mongodb

Class MongoBulkWriteException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.MongoServerException
com.mongodb.MongoBulkWriteException
All Implemented Interfaces:
Serializable

public class MongoBulkWriteException extends MongoServerException
An exception that represents all errors associated with a bulk write operation.
Since:
3.0
  • Constructor Details

  • Method Details

    • getWriteResult

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

      public 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

      @Nullable 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
    • getServerAddress

      public ServerAddress getServerAddress()
      The address of the server which performed the bulk write operation.
      Overrides:
      getServerAddress in class MongoServerException
      Returns:
      the address
    • equals

      public boolean equals(Object o)
      Overrides:
      Object
    • hashCode

      public int hashCode()
      Overrides:
      Object