/** * Put a value in the map, asynchronously. * @param k the key * @param v the value * @return * @deprecated use {@link #rxPut} instead */ @Deprecated() public Observable<Void> putObservable(K k, V v) { io.vertx.rx.java.ObservableFuture<Void> completionHandler = io.vertx.rx.java.RxHelper.observableFuture(); put(k, v, completionHandler.toHandler()); return completionHandler; }
/** * Like {@link io.vertx.rxjava.core.shareddata.AsyncMap#put} but specifying a time to live for the entry. Entry will expire and get evicted after the * ttl. * @param k the key * @param v the value * @param ttl The time to live (in ms) for the entry * @return * @deprecated use {@link #rxPut} instead */ @Deprecated() public Observable<Void> putObservable(K k, V v, long ttl) { io.vertx.rx.java.ObservableFuture<Void> completionHandler = io.vertx.rx.java.RxHelper.observableFuture(); put(k, v, ttl, completionHandler.toHandler()); return completionHandler; }
/** * Put a value in the map, asynchronously. * @param k the key * @param v the value * @return */ public Single<Void> rxPut(K k, V v) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { put(k, v, fut); })); }
/** * Put a value in the map, asynchronously. * @param k the key * @param v the value * @return */ public Single<Void> rxPut(K k, V v) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { put(k, v, fut); })); }
/** * Like {@link io.vertx.rxjava.core.shareddata.AsyncMap#put} but specifying a time to live for the entry. Entry will expire and get evicted after the * ttl. * @param k the key * @param v the value * @param ttl The time to live (in ms) for the entry * @return */ public Single<Void> rxPut(K k, V v, long ttl) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { put(k, v, ttl, fut); })); }
/** * Like {@link io.vertx.rxjava.core.shareddata.AsyncMap#put} but specifying a time to live for the entry. Entry will expire and get evicted after the * ttl. * @param k the key * @param v the value * @param ttl The time to live (in ms) for the entry * @return */ public Single<Void> rxPut(K k, V v, long ttl) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { put(k, v, ttl, fut); })); }