public abstract class BulkWriteResult
extends java.lang.Object
| Constructor and Description |
|---|
BulkWriteResult() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
getInsertedCount()
Returns the number of documents inserted by the write operation.
|
abstract int |
getMatchedCount()
Returns the number of documents matched by updates or replacements in the write operation.
|
abstract int |
getModifiedCount()
Returns the number of documents modified by the write operation.
|
abstract int |
getRemovedCount()
Returns the number of documents removed by the write operation.
|
abstract java.util.List<BulkWriteUpsert> |
getUpserts()
Gets an unmodifiable list of upserted items, or the empty list if there were none.
|
abstract boolean |
isAcknowledged()
Returns true if the write was acknowledged.
|
abstract boolean |
isModifiedCountAvailable()
Deprecated.
no longer needed since all supported server versions support modified count
|
public abstract boolean isAcknowledged()
WriteConcern.UNACKNOWLEDGEDpublic abstract int getInsertedCount()
java.lang.UnsupportedOperationException - if the write was unacknowledged.WriteConcern.UNACKNOWLEDGEDpublic abstract int getMatchedCount()
java.lang.UnsupportedOperationException - if the write was unacknowledged.WriteConcern.UNACKNOWLEDGEDpublic abstract int getRemovedCount()
java.lang.UnsupportedOperationException - if the write was unacknowledged.WriteConcern.UNACKNOWLEDGED@Deprecated public abstract boolean isModifiedCountAvailable()
This method now always returns true, as modified count is available since MongoDB 2.6.
java.lang.UnsupportedOperationException - if the write was unacknowledged.WriteConcern.UNACKNOWLEDGED,
getModifiedCount()public abstract int getModifiedCount()
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.
WriteConcern.UNACKNOWLEDGEDpublic abstract java.util.List<BulkWriteUpsert> getUpserts()
java.lang.UnsupportedOperationException - if the write was unacknowledged.WriteConcern.UNACKNOWLEDGEDCopyright © 2010 - 2023 Adobe. All Rights Reserved