diff --git a/redisson/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java b/redisson/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java index a3dd84e41..001b7182d 100644 --- a/redisson/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java +++ b/redisson/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java @@ -34,23 +34,10 @@ import org.redisson.command.CommandReactiveExecutor; import io.netty.buffer.ByteBuf; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** - *

Set-based cache with ability to set TTL for each entry via - * {@link #add(Object, long, TimeUnit)} method. - * And therefore has an complex lua-scripts inside. - * Uses map(value_hash, value) to tie with sorted set which contains expiration record for every value with TTL. - *

- * - *

Current Redis implementation doesn't have set entry eviction functionality. - * Thus values are checked for TTL expiration during any value read operation. - * If entry expired then it doesn't returns and clean task runs hronous. - * Clean task deletes removes 100 expired entries at once. - * In addition there is {@link org.redisson.eviction.EvictionScheduler}. This scheduler - * deletes expired entries in time interval between 5 seconds to 2 hours.

- * - *

If eviction is not required then it's better to use {@link org.redisson.api.RSet}.

- * + * * @author Nikita Koksharov * * @param value @@ -88,7 +75,7 @@ public class RedissonSetCacheReactive { public Publisher addAll(Collection c) { if (c.isEmpty()) { - return Streams.just(0); + return Mono.just(0); } long score = 92233720368547758L - System.currentTimeMillis();