class UpdateCommandProtocol extends WriteCommandProtocol
| Modifier and Type | Field and Description |
|---|---|
private static Logger |
LOGGER |
private java.util.List<UpdateRequest> |
updates |
| Constructor and Description |
|---|
UpdateCommandProtocol(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
java.lang.Boolean bypassDocumentValidation,
java.util.List<UpdateRequest> updates)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected UpdateCommandMessage |
createRequestMessage(MessageSettings messageSettings) |
BulkWriteResult |
execute(InternalConnection connection)
Execute the protocol.
|
void |
executeAsync(InternalConnection connection,
SingleResultCallback<BulkWriteResult> callback)
Execute the protocol asynchronously.
|
protected Logger |
getLogger()
Gets the logger.
|
protected WriteRequest.Type |
getType() |
getBypassDocumentValidation, getNamespace, getWriteConcern, isOrdered, setCommandListenerprivate static final Logger LOGGER
private final java.util.List<UpdateRequest> updates
public UpdateCommandProtocol(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, java.lang.Boolean bypassDocumentValidation, java.util.List<UpdateRequest> updates)
namespace - the namespaceordered - whether the inserts are orderedwriteConcern - the write concernbypassDocumentValidation - the bypass documentation validation flagupdates - the list of updatespublic BulkWriteResult execute(InternalConnection connection)
Protocolexecute in interface Protocol<BulkWriteResult>execute in class WriteCommandProtocolconnection - the connection to execute the protocol onpublic void executeAsync(InternalConnection connection, SingleResultCallback<BulkWriteResult> callback)
ProtocolexecuteAsync in interface Protocol<BulkWriteResult>executeAsync in class WriteCommandProtocolconnection - the connection to execute the protocol oncallback - the callback that is passed the result of the executionprotected WriteRequest.Type getType()
getType in class WriteCommandProtocolprotected UpdateCommandMessage createRequestMessage(MessageSettings messageSettings)
createRequestMessage in class WriteCommandProtocolprotected Logger getLogger()
WriteCommandProtocolgetLogger in class WriteCommandProtocol