/** * Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter. * @return * @deprecated use {@link #rxGetCounter} instead */ @Deprecated() public Observable<io.vertx.rxjava.core.shareddata.Counter> getCounterObservable(String name) { io.vertx.rx.java.ObservableFuture<io.vertx.rxjava.core.shareddata.Counter> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); getCounter(name, resultHandler.toHandler()); return resultHandler; }
/** * Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter. * @return */ public Single<io.vertx.rxjava.core.shareddata.Counter> rxGetCounter(String name) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { getCounter(name, fut); })); }
/** * Get an asynchronous counter. The counter will be passed to the handler. * @param name the name of the counter. * @return */ public Single<io.vertx.rxjava.core.shareddata.Counter> rxGetCounter(String name) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { getCounter(name, fut); })); }