class AcknowledgedBulkWriteResult extends BulkWriteResult
| Modifier and Type | Field and Description |
|---|---|
private int |
insertedCount |
private int |
matchedCount |
private java.lang.Integer |
modifiedCount |
private int |
removedCount |
private java.util.List<BulkWriteUpsert> |
upserts |
| Constructor and Description |
|---|
AcknowledgedBulkWriteResult(int insertedCount,
int matchedCount,
int removedCount,
java.lang.Integer modifiedCount,
java.util.List<BulkWriteUpsert> upserts) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getInsertedCount()
Returns the number of documents inserted by the write operation.
|
int |
getMatchedCount()
Returns the number of documents matched by updates or replacements in the write operation.
|
int |
getModifiedCount()
Returns the number of documents modified by the write operation.
|
int |
getRemovedCount()
Returns the number of documents removed by the write operation.
|
java.util.List<BulkWriteUpsert> |
getUpserts()
Gets an unmodifiable list of upserted items, or the empty list if there were none.
|
int |
hashCode() |
boolean |
isAcknowledged()
Returns true if the write was acknowledged.
|
boolean |
isModifiedCountAvailable()
Returns true if the server was able to provide a count of modified documents.
|
java.lang.String |
toString() |
private int insertedCount
private int matchedCount
private int removedCount
private java.lang.Integer modifiedCount
private final java.util.List<BulkWriteUpsert> upserts
AcknowledgedBulkWriteResult(int insertedCount,
int matchedCount,
int removedCount,
java.lang.Integer modifiedCount,
java.util.List<BulkWriteUpsert> upserts)
public boolean isAcknowledged()
BulkWriteResultisAcknowledged in class BulkWriteResultWriteConcern.UNACKNOWLEDGEDpublic int getInsertedCount()
BulkWriteResultgetInsertedCount in class BulkWriteResultWriteConcern.UNACKNOWLEDGEDpublic int getMatchedCount()
BulkWriteResultgetMatchedCount in class BulkWriteResultWriteConcern.UNACKNOWLEDGEDpublic int getRemovedCount()
BulkWriteResultgetRemovedCount in class BulkWriteResultWriteConcern.UNACKNOWLEDGEDpublic boolean isModifiedCountAvailable()
BulkWriteResultgetModifiedCount method will throw UnsupportedOperationException.isModifiedCountAvailable in class BulkWriteResultWriteConcern.UNACKNOWLEDGED,
BulkWriteResult.getModifiedCount()public int getModifiedCount()
BulkWriteResultReturns 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.
If the server is not able to provide a count of modified documents (which can happen if the server is not at least version 2.6),
then this method will throw an UnsupportedOperationException
getModifiedCount in class BulkWriteResultWriteConcern.UNACKNOWLEDGED,
BulkWriteResult.isModifiedCountAvailable()public java.util.List<BulkWriteUpsert> getUpserts()
BulkWriteResultgetUpserts in class BulkWriteResultWriteConcern.UNACKNOWLEDGEDpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object