Example usage for com.mongodb.async.client MongoCollection drop

List of usage examples for com.mongodb.async.client MongoCollection drop

Introduction

In this page you can find the example usage for com.mongodb.async.client MongoCollection drop.

Prototype

void drop(SingleResultCallback<Void> callback);

Source Link

Document

Drops this collection from the Database.

Usage

From source file:io.vertx.ext.mongo.impl.MongoClientImpl.java

License:Open Source License

@Override
public io.vertx.ext.mongo.MongoClient dropCollection(String collection,
        Handler<AsyncResult<Void>> resultHandler) {
    requireNonNull(collection, "collection cannot be null");
    requireNonNull(resultHandler, "resultHandler cannot be null");

    MongoCollection<JsonObject> coll = getCollection(collection);
    coll.drop(wrapCallback(resultHandler));
    return this;
}