|
@@ -4,9 +4,13 @@ import lombok.AccessLevel;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
import org.hswebframework.web.cache.ReactiveCache;
|
|
import org.hswebframework.web.cache.ReactiveCache;
|
|
import org.reactivestreams.Publisher;
|
|
import org.reactivestreams.Publisher;
|
|
|
|
+import reactor.cache.CacheFlux;
|
|
|
|
+import reactor.cache.CacheMono;
|
|
import reactor.core.publisher.Flux;
|
|
import reactor.core.publisher.Flux;
|
|
import reactor.core.publisher.Mono;
|
|
import reactor.core.publisher.Mono;
|
|
|
|
|
|
|
|
+import java.util.function.Supplier;
|
|
|
|
+
|
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
|
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
|
public class UnSupportedReactiveCache<E> implements ReactiveCache<E> {
|
|
public class UnSupportedReactiveCache<E> implements ReactiveCache<E> {
|
|
|
|
|
|
@@ -40,4 +44,14 @@ public class UnSupportedReactiveCache<E> implements ReactiveCache<E> {
|
|
public Mono<Void> clear() {
|
|
public Mono<Void> clear() {
|
|
return Mono.empty();
|
|
return Mono.empty();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public CacheMono.MonoCacheBuilderMapMiss<E> mono(Object key) {
|
|
|
|
+ return Supplier::get;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public CacheFlux.FluxCacheBuilderMapMiss<E> flux(Object key) {
|
|
|
|
+ return Supplier::get;
|
|
|
|
+ }
|
|
}
|
|
}
|