public class InsertOperation extends BaseWriteOperation
| 构造器和说明 |
|---|
InsertOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
java.util.List<InsertRequest> insertRequests)
Construct an instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected BulkWriteResult |
executeCommandProtocol(Connection connection)
Executes the write command protocol.
|
protected void |
executeCommandProtocolAsync(AsyncConnection connection,
SingleResultCallback<BulkWriteResult> callback)
Asynchronously executes the write command protocol.
|
protected WriteConcernResult |
executeProtocol(Connection connection)
Executes the write protocol
|
protected void |
executeProtocolAsync(AsyncConnection connection,
SingleResultCallback<WriteConcernResult> callback)
Asynchronously executes the write protocol
|
protected int |
getCount(BulkWriteResult bulkWriteResult) |
java.util.List<InsertRequest> |
getInsertRequests()
Gets the list of insert requests.
|
protected WriteRequest.Type |
getType() |
bypassDocumentValidation, execute, executeAsync, getBypassDocumentValidation, getNamespace, getUpdatedExisting, getWriteConcern, isOrderedpublic InsertOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, java.util.List<InsertRequest> insertRequests)
namespace - the database and collection namespace for the operation.ordered - whether the inserts are ordered.writeConcern - the write concern for the operation.insertRequests - the list of inserts.public java.util.List<InsertRequest> getInsertRequests()
protected WriteConcernResult executeProtocol(Connection connection)
BaseWriteOperationexecuteProtocol 在类中 BaseWriteOperationconnection - the connectionprotected void executeProtocolAsync(AsyncConnection connection, SingleResultCallback<WriteConcernResult> callback)
BaseWriteOperationexecuteProtocolAsync 在类中 BaseWriteOperationconnection - the connectioncallback - the callback to be passed the WriteConcernResultprotected BulkWriteResult executeCommandProtocol(Connection connection)
BaseWriteOperationexecuteCommandProtocol 在类中 BaseWriteOperationconnection - the connectionprotected void executeCommandProtocolAsync(AsyncConnection connection, SingleResultCallback<BulkWriteResult> callback)
BaseWriteOperationexecuteCommandProtocolAsync 在类中 BaseWriteOperationconnection - the connectioncallback - the callback to be passed the BulkWriteResultprotected WriteRequest.Type getType()
getType 在类中 BaseWriteOperationprotected int getCount(BulkWriteResult bulkWriteResult)
getCount 在类中 BaseWriteOperation