/** * Add the value to the counter atomically and return the new count * @param value the value to add * @return * @deprecated use {@link #rxAddAndGet} instead */ @Deprecated() public Observable<Long> addAndGetObservable(long value) { io.vertx.rx.java.ObservableFuture<Long> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); addAndGet(value, resultHandler.toHandler()); return resultHandler; }
/** * Add the value to the counter atomically and return the new count * @param value the value to add * @return */ public Single<Long> rxAddAndGet(long value) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { addAndGet(value, fut); })); }
/** * Add the value to the counter atomically and return the new count * @param value the value to add * @return */ public Single<Long> rxAddAndGet(long value) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { addAndGet(value, fut); })); }