@Deprecated public class CreateIndexesOperation extends java.lang.Object implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>
Multiple index creation is supported starting with MongoDB server version 2.6
| Constructor and Description |
|---|
CreateIndexesOperation(MongoNamespace namespace,
java.util.List<IndexRequest> requests)
Deprecated.
|
CreateIndexesOperation(MongoNamespace namespace,
java.util.List<IndexRequest> requests,
WriteConcern writeConcern)
Deprecated.
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Void |
execute(WriteBinding binding)
Deprecated.
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<java.lang.Void> callback)
Deprecated.
General execute which can return anything of type T
|
java.util.List<java.lang.String> |
getIndexNames()
Deprecated.
Gets the index names.
|
long |
getMaxTime(java.util.concurrent.TimeUnit timeUnit)
Deprecated.
Gets the maximum execution time on the server for this operation.
|
java.util.List<IndexRequest> |
getRequests()
Deprecated.
Gets the index requests.
|
WriteConcern |
getWriteConcern()
Deprecated.
Gets the write concern.
|
CreateIndexesOperation |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Deprecated.
Sets the maximum execution time on the server for this operation.
|
@Deprecated public CreateIndexesOperation(MongoNamespace namespace, java.util.List<IndexRequest> requests)
CreateIndexesOperation(MongoNamespace, List, WriteConcern)namespace - the database and collection namespace for the operation.requests - the index requestpublic CreateIndexesOperation(MongoNamespace namespace, java.util.List<IndexRequest> requests, WriteConcern writeConcern)
namespace - the database and collection namespace for the operation.requests - the index requestwriteConcern - the write concernpublic WriteConcern getWriteConcern()
public java.util.List<IndexRequest> getRequests()
public java.util.List<java.lang.String> getIndexNames()
public long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic CreateIndexesOperation maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic java.lang.Void execute(WriteBinding binding)
WriteOperationexecute in interface WriteOperation<java.lang.Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<java.lang.Void> callback)
AsyncWriteOperationexecuteAsync in interface AsyncWriteOperation<java.lang.Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executedCopyright © 2010 - 2023 Adobe. All Rights Reserved