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, setCommandListener
private 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)
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 DeleteCommandMessage createRequestMessage(MessageSettings messageSettings)
createRequestMessage
in class WriteCommandProtocol
protected Logger getLogger()
WriteCommandProtocol
getLogger
in class WriteCommandProtocol