public class UpdateOperation extends BaseWriteOperation
| Constructor and Description |
|---|
UpdateOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
List<UpdateRequest> updates)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected BulkWriteResult |
executeCommandProtocol(Connection connection)
Executes the write command protocol.
|
protected void |
executeCommandProtocolAsync(AsyncConnection connection,
SingleResultCallback<BulkWriteResult> callback)
Asynchronously executes the write command protocol.
|
protected WriteConcernResult |
executeProtocol(Connection connection)
Executes the write protocol
|
protected void |
executeProtocolAsync(AsyncConnection connection,
SingleResultCallback<WriteConcernResult> callback)
Asynchronously executes the write protocol
|
protected int |
getCount(BulkWriteResult bulkWriteResult) |
protected WriteRequest.Type |
getType() |
protected boolean |
getUpdatedExisting(BulkWriteResult bulkWriteResult) |
List<UpdateRequest> |
getUpdateRequests()
Gets the list of update requests.
|
bypassDocumentValidation, execute, executeAsync, getBypassDocumentValidation, getNamespace, getWriteConcern, isOrderedpublic UpdateOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<UpdateRequest> updates)
namespace - the database and collection namespace for the operation.ordered - whether the updates are ordered.writeConcern - the write concern for the operation.updates - the update requests.public List<UpdateRequest> getUpdateRequests()
protected WriteConcernResult executeProtocol(Connection connection)
BaseWriteOperationexecuteProtocol in class BaseWriteOperationconnection - the connectionprotected void executeProtocolAsync(AsyncConnection connection, SingleResultCallback<WriteConcernResult> callback)
BaseWriteOperationexecuteProtocolAsync in class BaseWriteOperationconnection - the connectioncallback - the callback to be passed the WriteConcernResultprotected BulkWriteResult executeCommandProtocol(Connection connection)
BaseWriteOperationexecuteCommandProtocol in class BaseWriteOperationconnection - the connectionprotected void executeCommandProtocolAsync(AsyncConnection connection, SingleResultCallback<BulkWriteResult> callback)
BaseWriteOperationexecuteCommandProtocolAsync in class BaseWriteOperationconnection - the connectioncallback - the callback to be passed the BulkWriteResultprotected WriteRequest.Type getType()
getType in class BaseWriteOperationprotected int getCount(BulkWriteResult bulkWriteResult)
getCount in class BaseWriteOperationprotected boolean getUpdatedExisting(BulkWriteResult bulkWriteResult)
getUpdatedExisting in class BaseWriteOperation