class DeleteCommandProtocol extends WriteCommandProtocol
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<DeleteRequest> |
deleteRequests |
private static Logger |
LOGGER |
| Constructor and Description |
|---|
DeleteCommandProtocol(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
java.util.List<DeleteRequest> deletes)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected DeleteCommandMessage |
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<DeleteRequest> deleteRequests
public DeleteCommandProtocol(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, java.util.List<DeleteRequest> deletes)
namespace - the namespaceordered - whether the inserts are orderedwriteConcern - the write concerndeletes - the list of deletespublic 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 DeleteCommandMessage createRequestMessage(MessageSettings messageSettings)
createRequestMessage in class WriteCommandProtocolprotected Logger getLogger()
WriteCommandProtocolgetLogger in class WriteCommandProtocol