public class BulkWriteOperation extends Object
DBCollection.initializeOrderedBulkOperation()
,
DBCollection.initializeUnorderedBulkOperation()
Modifier and Type | Method | Description |
---|---|---|
BulkWriteResult |
executeβ() |
Execute the bulk write operation with the default write concern of the collection from which this came.
|
BulkWriteResult |
executeβ(WriteConcern writeConcern) |
Execute the bulk write operation with the given write concern.
|
BulkWriteRequestBuilder |
findβ(DBObject query) |
Start building a write request to add to the bulk write operation.
|
Boolean |
getBypassDocumentValidationβ() |
Gets whether to bypass document validation, or null if unspecified.
|
void |
insertβ(DBObject document) |
Add an insert request to the bulk operation
|
boolean |
isOrderedβ() |
Returns true if this is building an ordered bulk write request.
|
void |
setBypassDocumentValidationβ(Boolean bypassDocumentValidation) |
Sets whether to bypass document validation.
|
public boolean isOrderedβ()
DBCollection.initializeOrderedBulkOperation()
,
DBCollection.initializeUnorderedBulkOperation()
public Boolean getBypassDocumentValidationβ()
public void setBypassDocumentValidationβ(Boolean bypassDocumentValidation)
bypassDocumentValidation
- whether to bypass document validation, or null if unspecifiedpublic void insertβ(DBObject document)
document
- the document to insertpublic BulkWriteRequestBuilder findβ(DBObject query)
query
- the query for an update, replace or remove requestpublic BulkWriteResult executeβ()
BulkWriteException
- if the write failed due some other failure specific to the write commandMongoException
- if the operation failed for some other reasonpublic BulkWriteResult executeβ(WriteConcern writeConcern)
writeConcern
- the write concern to apply to the bulk operation.BulkWriteException
- if the write failed due some other failure specific to the write commandMongoException
- if the operation failed for some other reason