mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
release 2.0.0
This commit is contained in:
@@ -2,7 +2,7 @@ package dev.tommyjs.futur.reactor;
|
||||
|
||||
import dev.tommyjs.futur.promise.Promise;
|
||||
import dev.tommyjs.futur.promise.PromiseFactory;
|
||||
import dev.tommyjs.futur.promise.UnpooledPromiseFactory;
|
||||
import dev.tommyjs.futur.promise.StaticPromiseFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -19,10 +19,6 @@ public class ReactorTransformer {
|
||||
return promise;
|
||||
}
|
||||
|
||||
public static <T> @NotNull Promise<T> wrapMono(@NotNull Mono<T> mono) {
|
||||
return wrapMono(mono, UnpooledPromiseFactory.INSTANCE);
|
||||
}
|
||||
|
||||
public static <T> @NotNull Promise<@NotNull List<T>> wrapFlux(@NotNull Flux<T> flux, PromiseFactory factory) {
|
||||
Promise<List<T>> promise = factory.unresolved();
|
||||
AtomicReference<List<T>> out = new AtomicReference<>(new ArrayList<>());
|
||||
@@ -34,8 +30,4 @@ public class ReactorTransformer {
|
||||
return promise;
|
||||
}
|
||||
|
||||
public static <T> @NotNull Promise<@NotNull List<T>> wrapFlux(@NotNull Flux<T> flux) {
|
||||
return wrapFlux(flux, UnpooledPromiseFactory.INSTANCE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user