public io.vertx.rxjava.ext.mongo.MongoService bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler) { delegate.bulkWrite(collection, operations, resultHandler); return this; }
public io.vertx.rxjava.ext.mongo.MongoService bulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler) { delegate.bulkWriteWithOptions(collection, operations, bulkWriteOptions, resultHandler); return this; }
@Override public void stop() throws Exception { service.close(); } }
public io.vertx.rxjava.ext.mongo.MongoService count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler) { delegate.count(collection, query, resultHandler); return this; }
public io.vertx.rxjava.ext.mongo.MongoService find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler) { delegate.find(collection, query, resultHandler); return this; }
/** * Create a proxy to a service that is deployed somewhere on the event bus * @param vertx the Vert.x instance * @param address the address the service is listening on on the event bus * @return the service */ public static io.vertx.rxjava.ext.mongo.MongoService createEventBusProxy(io.vertx.rxjava.core.Vertx vertx, String address) { io.vertx.rxjava.ext.mongo.MongoService ret = io.vertx.rxjava.ext.mongo.MongoService.newInstance(io.vertx.ext.mongo.MongoService.createEventBusProxy(vertx.getDelegate(), address)); return ret; }
public io.vertx.rxjava.ext.mongo.MongoService createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler) { delegate.createIndexWithOptions(collection, key, options, resultHandler); return this; }
public io.vertx.rxjava.ext.mongo.MongoService distinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler) { delegate.distinctWithQuery(collection, fieldName, resultClassname, query, resultHandler); return this; }
public io.vertx.rxjava.ext.mongo.MongoService createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler) { delegate.createIndex(collection, key, resultHandler); return this; }
public io.vertx.rxjava.ext.mongo.MongoService distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler) { delegate.distinct(collection, fieldName, resultClassname, resultHandler); return this; }
public static io.vertx.ext.mongo.MongoService count(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Long>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.count(collection, query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Long>>() { public void handle(io.vertx.core.AsyncResult<java.lang.Long> ar) { resultHandler.handle(ar.map(event -> event)); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService remove(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
public static io.vertx.ext.mongo.MongoService find(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.find(collection, query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>>>() { public void handle(io.vertx.core.AsyncResult<java.util.List<io.vertx.core.json.JsonObject>> ar) { resultHandler.handle(ar.map(event -> event != null ? event.stream().map(elt -> io.vertx.core.impl.ConversionHelper.fromJsonObject(elt)).collect(java.util.stream.Collectors.toList()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService findWithOptions(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> query, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) {
@Override public void setUp() throws Exception { super.setUp(); JsonObject config = getConfig(); DeploymentOptions options = new DeploymentOptions().setConfig(config); CountDownLatch latch = new CountDownLatch(1); vertx.deployVerticle("service:io.vertx.mongo-service", options, onSuccess(id -> { mongoClient = MongoService.createEventBusProxy(vertx, "vertx.mongo"); dropCollections(mongoClient, latch); })); awaitLatch(latch); }
public static io.vertx.ext.mongo.MongoService createIndexWithOptions(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> key, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createIndexWithOptions(collection, key != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(key) : null, options != null ? new io.vertx.ext.mongo.IndexOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() { public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) { resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event))); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService listIndexes(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) {
public static io.vertx.ext.mongo.MongoService distinctWithQuery(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinctWithQuery(collection, fieldName, resultClassname, query != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(query) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray> ar) { resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event))); } } : null)); return j_receiver; } }
public static io.vertx.ext.mongo.MongoService createIndex(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> key, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createIndex(collection, key != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(key) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() { public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) { resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event))); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService createIndexWithOptions(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> key, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
public static io.vertx.ext.mongo.MongoService distinct(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.distinct(collection, fieldName, resultClassname, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.core.json.JsonArray> ar) { resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromJsonArray(event))); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService distinctWithQuery(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.lang.String fieldName, java.lang.String resultClassname, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<Object>>> resultHandler) {
public static io.vertx.ext.mongo.MongoService bulkWriteWithOptions(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.List<java.util.Map<String, Object>> operations, java.util.Map<String, Object> bulkWriteOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.bulkWriteWithOptions(collection, operations != null ? operations.stream().map(elt -> elt != null ? new io.vertx.ext.mongo.BulkOperation(io.vertx.core.impl.ConversionHelper.toJsonObject(elt)) : null).collect(java.util.stream.Collectors.toList()) : null, bulkWriteOptions != null ? new io.vertx.ext.mongo.BulkWriteOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(bulkWriteOptions)) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService find(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.Map<String, Object> query, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> resultHandler) {
public static io.vertx.ext.mongo.MongoService bulkWrite(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.List<java.util.Map<String, Object>> operations, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.bulkWrite(collection, operations != null ? operations.stream().map(elt -> elt != null ? new io.vertx.ext.mongo.BulkOperation(io.vertx.core.impl.ConversionHelper.toJsonObject(elt)) : null).collect(java.util.stream.Collectors.toList()) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.mongo.MongoClientBulkWriteResult> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.mongo.MongoService bulkWriteWithOptions(io.vertx.ext.mongo.MongoService j_receiver, java.lang.String collection, java.util.List<java.util.Map<String, Object>> operations, java.util.Map<String, Object> bulkWriteOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
public void close() { delegate.close(); }