Package com.mongodb.operation
Class MixedBulkWriteOperation
java.lang.Object
com.mongodb.operation.MixedBulkWriteOperation
- All Implemented Interfaces:
AsyncWriteOperation<BulkWriteResult>
,WriteOperation<BulkWriteResult>
@Deprecated
public class MixedBulkWriteOperation
extends Object
implements AsyncWriteOperation<BulkWriteResult>, WriteOperation<BulkWriteResult>
Deprecated.
An operation to execute a series of write operations in bulk.
- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionMixedBulkWriteOperation
(MongoNamespace namespace, List<? extends WriteRequest> writeRequests, boolean ordered, WriteConcern writeConcern) Deprecated.MixedBulkWriteOperation
(MongoNamespace namespace, List<? extends WriteRequest> writeRequests, boolean ordered, WriteConcern writeConcern, boolean retryWrites) Deprecated.Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbypassDocumentValidation
(Boolean bypassDocumentValidation) Deprecated.Sets the bypass document level validation flag.execute
(WriteBinding binding) Deprecated.Executes a bulk write operation.void
executeAsync
(AsyncWriteBinding binding, SingleResultCallback<BulkWriteResult> callback) Deprecated.General execute which can return anything of type TDeprecated.Gets the the bypass document level validation flagDeprecated.Gets the namespace of the collection to write to.Deprecated.Returns true if writes should be retried if they fail due to a network error.Deprecated.Gets the write concern to applyList
<? extends WriteRequest> Deprecated.Gets the list of write requests to execute.boolean
Deprecated.Gets whether the writes are ordered.
-
Constructor Details
-
MixedBulkWriteOperation
@Deprecated public MixedBulkWriteOperation(MongoNamespace namespace, List<? extends WriteRequest> writeRequests, boolean ordered, WriteConcern writeConcern) Deprecated.Construct a new instance.- Parameters:
namespace
- the database and collection namespace for the operation.writeRequests
- the list of writeRequests to execute.ordered
- whether the writeRequests must be executed in order.writeConcern
- the write concern for the operation.
-
MixedBulkWriteOperation
public MixedBulkWriteOperation(MongoNamespace namespace, List<? extends WriteRequest> writeRequests, boolean ordered, WriteConcern writeConcern, boolean retryWrites) Deprecated.Construct a new instance.- Parameters:
namespace
- the database and collection namespace for the operation.writeRequests
- the list of writeRequests to execute.ordered
- whether the writeRequests must be executed in order.writeConcern
- the write concern for the operation.retryWrites
- if writes should be retried if they fail due to a network error.- Since:
- 3.6
-
-
Method Details
-
getNamespace
Deprecated.Gets the namespace of the collection to write to.- Returns:
- the namespace
-
getWriteConcern
Deprecated.Gets the write concern to apply- Returns:
- the write concern
-
isOrdered
public boolean isOrdered()Deprecated.Gets whether the writes are ordered. If true, no more writes will be executed after the first failure.- Returns:
- whether the writes are ordered
-
getWriteRequests
Deprecated.Gets the list of write requests to execute.- Returns:
- the list of write requests
-
getBypassDocumentValidation
Deprecated.Gets the the bypass document level validation flag- Returns:
- the bypass document level validation flag
- Since:
- 3.2
-
bypassDocumentValidation
Deprecated.Sets the bypass document level validation flag.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
- Since:
- 3.2
-
getRetryWrites
Deprecated.Returns true if writes should be retried if they fail due to a network error.- Returns:
- the retryWrites value
- Since:
- 3.6
-
execute
Deprecated.Executes a bulk write operation.- Specified by:
execute
in interfaceWriteOperation<BulkWriteResult>
- Parameters:
binding
- the WriteBinding for the operation- Returns:
- the bulk write result.
- Throws:
MongoBulkWriteException
- if a failure to complete the bulk write is detected based on the server response
-
executeAsync
Deprecated.Description copied from interface:AsyncWriteOperation
General execute which can return anything of type T- Specified by:
executeAsync
in interfaceAsyncWriteOperation<BulkWriteResult>
- Parameters:
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed
-
MixedBulkWriteOperation(MongoNamespace, List, boolean, WriteConcern, boolean)
instead