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) |
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, setCommandListener
private static final Logger LOGGER
private final java.util.List<UpdateRequest> updates
UpdateCommandProtocol(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, java.lang.Boolean bypassDocumentValidation, java.util.List<UpdateRequest> updates)
public BulkWriteResult execute(InternalConnection connection)
Protocol
execute
in interface Protocol<BulkWriteResult>
execute
in class WriteCommandProtocol
connection
- the connection to execute the protocol onpublic void executeAsync(InternalConnection connection, SingleResultCallback<BulkWriteResult> callback)
Protocol
executeAsync
in interface Protocol<BulkWriteResult>
executeAsync
in class WriteCommandProtocol
connection
- the connection to execute the protocol oncallback
- the callback that is passed the result of the executionprotected WriteRequest.Type getType()
getType
in class WriteCommandProtocol
protected UpdateCommandMessage createRequestMessage(MessageSettings messageSettings)
createRequestMessage
in class WriteCommandProtocol
protected Logger getLogger()
WriteCommandProtocol
getLogger
in class WriteCommandProtocol