Package com.mongodb.client.model.bulk
Interface ClientBulkWriteResult
The result of a successful or partially successful client-level bulk write operation.
Note that if a client-level bulk write operation fails while some of the
individual write operations are known to be successful,
then the successful partial result is still accessible via
ClientBulkWriteException.getPartialResult()
.- Since:
- 5.3
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The verbose results of individual operations. -
Method Summary
Modifier and TypeMethodDescriptionlong
The number of documents that were deleted across all delete operations.long
The number of documents that were inserted across all insert operations.long
The number of documents that matched the filters across all operations with filters.long
The number of documents that were modified across all update and replace operations.long
The number of documents that were upserted across all update and replace operations.The verbose results of individual operations.boolean
Indicates whether this result was acknowledged.
-
Method Details
-
isAcknowledged
boolean isAcknowledged()Indicates whether this result was acknowledged. If not, then all other methods throwUnsupportedOperationException
.- Returns:
- Whether this result was acknowledged.
-
getInsertedCount
long getInsertedCount()The number of documents that were inserted across all insert operations.- Returns:
- The number of documents that were inserted.
- Throws:
UnsupportedOperationException
- If this result is not acknowledged.
-
getUpsertedCount
long getUpsertedCount()The number of documents that were upserted across all update and replace operations.- Returns:
- The number of documents that were upserted.
- Throws:
UnsupportedOperationException
- If this result is not acknowledged.
-
getMatchedCount
long getMatchedCount()The number of documents that matched the filters across all operations with filters.- Returns:
- The number of documents that were matched.
- Throws:
UnsupportedOperationException
- If this result is not acknowledged.
-
getModifiedCount
long getModifiedCount()The number of documents that were modified across all update and replace operations.- Returns:
- The number of documents that were modified.
- Throws:
UnsupportedOperationException
- If this result is not acknowledged.
-
getDeletedCount
long getDeletedCount()The number of documents that were deleted across all delete operations.- Returns:
- The number of documents that were deleted.
- Throws:
UnsupportedOperationException
- If this result is not acknowledged.
-
getVerboseResults
Optional<ClientBulkWriteResult.VerboseResults> getVerboseResults()The verbose results of individual operations.- Returns:
Optional
verbose results of individual operations.- Throws:
UnsupportedOperationException
- If this result is not acknowledged.- See Also:
-