List of usage examples for com.mongodb.async.client MongoCollection count
@Deprecated
void count(ClientSession clientSession, SingleResultCallback<Long> callback);
From source file:io.vertx.ext.mongo.impl.MongoClientImpl.java
License:Open Source License
@Override public io.vertx.ext.mongo.MongoClient count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler) { requireNonNull(collection, "collection cannot be null"); requireNonNull(query, "query cannot be null"); requireNonNull(resultHandler, "resultHandler cannot be null"); Bson bquery = wrap(encodeKeyWhenUseObjectId(query)); MongoCollection<JsonObject> coll = getCollection(collection); coll.count(bquery, wrapCallback(resultHandler)); return this; }