/** * Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter. * @param resultHandler the handler */ public void getCounter(String name, Handler<AsyncResult<io.vertx.rxjava.core.shareddata.Counter>> resultHandler) { delegate.getCounter(name, new Handler<AsyncResult<io.vertx.core.shareddata.Counter>>() { public void handle(AsyncResult<io.vertx.core.shareddata.Counter> ar) { if (ar.succeeded()) { resultHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.shareddata.Counter.newInstance(ar.result()))); } else { resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause())); } } }); }
/** * Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter. * @param resultHandler the handler */ public void getCounter(String name, Handler<AsyncResult<io.vertx.rxjava.core.shareddata.Counter>> resultHandler) { delegate.getCounter(name, new Handler<AsyncResult<io.vertx.core.shareddata.Counter>>() { public void handle(AsyncResult<io.vertx.core.shareddata.Counter> ar) { if (ar.succeeded()) { resultHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.shareddata.Counter.newInstance(ar.result()))); } else { resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause())); } } }); }