public class DropIndexOperation extends java.lang.Object implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>
Constructor and Description |
---|
DropIndexOperation(MongoNamespace namespace,
BsonDocument keys)
Deprecated.
|
DropIndexOperation(MongoNamespace namespace,
BsonDocument indexKeys,
WriteConcern writeConcern)
Construct a new instance.
|
DropIndexOperation(MongoNamespace namespace,
java.lang.String indexName)
Deprecated.
|
DropIndexOperation(MongoNamespace namespace,
java.lang.String indexName,
WriteConcern writeConcern)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Void |
execute(WriteBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<java.lang.Void> callback)
General execute which can return anything of type T
|
long |
getMaxTime(java.util.concurrent.TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
WriteConcern |
getWriteConcern()
Gets the write concern.
|
DropIndexOperation |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
@Deprecated public DropIndexOperation(MongoNamespace namespace, java.lang.String indexName)
DropIndexOperation(MongoNamespace, String, WriteConcern)
namespace
- the database and collection namespace for the operation.indexName
- the name of the index to be dropped.@Deprecated public DropIndexOperation(MongoNamespace namespace, BsonDocument keys)
DropIndexOperation(MongoNamespace, BsonDocument, WriteConcern)
namespace
- the database and collection namespace for the operation.keys
- the keys of the index to be droppedpublic DropIndexOperation(MongoNamespace namespace, java.lang.String indexName, WriteConcern writeConcern)
namespace
- the database and collection namespace for the operation.indexName
- the name of the index to be dropped.writeConcern
- the write concernpublic DropIndexOperation(MongoNamespace namespace, BsonDocument indexKeys, WriteConcern writeConcern)
namespace
- the database and collection namespace for the operation.indexKeys
- the keys of the index to be droppedwriteConcern
- the write concernpublic WriteConcern getWriteConcern()
public long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DropIndexOperation 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)
WriteOperation
execute
in interface WriteOperation<java.lang.Void>
binding
- the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<java.lang.Void> callback)
AsyncWriteOperation
executeAsync
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 - 2020 Adobe. All Rights Reserved