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, setCommandListener
private 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)
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