AsyncWriteOperation<Void>
, WriteOperation<Void>
public class DropIndexOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
Constructor | Description |
---|---|
DropIndexOperation(MongoNamespace namespace,
String indexName) |
Deprecated.
|
DropIndexOperation(MongoNamespace namespace,
String indexName,
WriteConcern writeConcern) |
Construct a new instance.
|
DropIndexOperation(MongoNamespace namespace,
BsonDocument keys) |
Deprecated.
|
DropIndexOperation(MongoNamespace namespace,
BsonDocument indexKeys,
WriteConcern writeConcern) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
Void |
execute(WriteBinding binding) |
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<Void> callback) |
General execute which can return anything of type T
|
long |
getMaxTime(TimeUnit timeUnit) |
Gets the maximum execution time on the server for this operation.
|
WriteConcern |
getWriteConcern() |
Gets the write concern.
|
DropIndexOperation |
maxTime(long maxTime,
TimeUnit timeUnit) |
Sets the maximum execution time on the server for this operation.
|
@Deprecated public DropIndexOperation(MongoNamespace namespace, 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, 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(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DropIndexOperation maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic Void execute(WriteBinding binding)
WriteOperation
execute
in interface WriteOperation<Void>
binding
- the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperation
executeAsync
in interface AsyncWriteOperation<Void>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed