Package com.mongodb

Class BulkWriteResult

java.lang.Object
com.mongodb.BulkWriteResult

@Deprecated(since="2021-05-27") public abstract class BulkWriteResult extends Object
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
The result of a successful bulk write operation.
Since:
2.12
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract int
    Deprecated.
    Returns the number of documents inserted by the write operation.
    abstract int
    Deprecated.
    Returns the number of documents matched by updates or replacements in the write operation.
    abstract int
    Deprecated.
    Returns the number of documents modified by the write operation.
    abstract int
    Deprecated.
    Returns the number of documents removed by the write operation.
    Deprecated.
    Gets an unmodifiable list of upserted items, or the empty list if there were none.
    abstract boolean
    Deprecated.
    Returns true if the write was acknowledged.
    abstract boolean
    Deprecated.
    no longer needed since all supported server versions support modified count

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BulkWriteResult

      public BulkWriteResult()
      Deprecated.
  • Method Details

    • isAcknowledged

      public abstract boolean isAcknowledged()
      Deprecated.
      Returns true if the write was acknowledged.
      Returns:
      true if the write was acknowledged
      See Also:
    • getInsertedCount

      public abstract int getInsertedCount()
      Deprecated.
      Returns the number of documents inserted by the write operation.
      Returns:
      the number of documents inserted by the write operation
      Throws:
      UnsupportedOperationException - if the write was unacknowledged.
      See Also:
    • getMatchedCount

      public abstract int getMatchedCount()
      Deprecated.
      Returns the number of documents matched by updates or replacements in the write operation. This will include documents that matched the query but where the modification didn't result in any actual change to the document; for example, if you set the value of some field, and the field already has that value, that will still count as an update.
      Returns:
      the number of documents matched by updates in the write operation
      Throws:
      UnsupportedOperationException - if the write was unacknowledged.
      See Also:
    • getRemovedCount

      public abstract int getRemovedCount()
      Deprecated.
      Returns the number of documents removed by the write operation.
      Returns:
      the number of documents removed by the write operation
      Throws:
      UnsupportedOperationException - if the write was unacknowledged.
      See Also:
    • isModifiedCountAvailable

      @Deprecated public abstract boolean isModifiedCountAvailable()
      Deprecated.
      no longer needed since all supported server versions support modified count
      Returns true if the server was able to provide a count of modified documents.

      This method now always returns true, as modified count is available since MongoDB 2.6.

      Returns:
      true if modifiedCount is available
      Throws:
      UnsupportedOperationException - if the write was unacknowledged.
      See Also:
    • getModifiedCount

      public abstract int getModifiedCount()
      Deprecated.

      Returns the number of documents modified by the write operation. This only applies to updates or replacements, and will only count documents that were actually changed; for example, if you set the value of some field , and the field already has that value, that will not count as a modification.

      Returns:
      the number of documents modified by the write operation
      See Also:
    • getUpserts

      public abstract List<BulkWriteUpsert> getUpserts()
      Deprecated.
      Gets an unmodifiable list of upserted items, or the empty list if there were none.
      Returns:
      a list of upserted items, or the empty list if there were none.
      Throws:
      UnsupportedOperationException - if the write was unacknowledged.
      See Also: