/** * Create a reusable Flux for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Flux} wrapping the {@link ReactiveRedisCallback}. */ public <T> Flux<T> createFlux(ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Flux.defer(() -> doInConnection(callback, exposeConnection)); }
/** * Create a reusable Mono for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Mono} wrapping the {@link ReactiveRedisCallback}. */ public <T> Mono<T> createMono(final ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Mono.defer(() -> Mono.from(doInConnection(callback, exposeConnection))); }
/** * Create a reusable Flux for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Flux} wrapping the {@link ReactiveRedisCallback}. */ public <T> Flux<T> createFlux(ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Flux.defer(() -> doInConnection(callback, exposeConnection)); }
/** * Create a reusable Flux for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Flux} wrapping the {@link ReactiveRedisCallback}. */ public <T> Flux<T> createFlux(ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Flux.defer(() -> doInConnection(callback, exposeConnection)); }
/** * Create a reusable Mono for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Mono} wrapping the {@link ReactiveRedisCallback}. */ public <T> Mono<T> createMono(final ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Mono.defer(() -> Mono.from(doInConnection(callback, exposeConnection))); }
/** * Create a reusable Mono for a {@link ReactiveRedisCallback}. Callback is executed within a connection context. The * connection is released outside the callback. * * @param callback must not be {@literal null} * @return a {@link Mono} wrapping the {@link ReactiveRedisCallback}. */ public <T> Mono<T> createMono(final ReactiveRedisCallback<T> callback) { Assert.notNull(callback, "ReactiveRedisCallback must not be null!"); return Mono.defer(() -> Mono.from(doInConnection(callback, exposeConnection))); }