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