mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
release v2.3.4
remove basic wrapper methods
This commit is contained in:
@@ -3,8 +3,6 @@ package dev.tommyjs.futur.promise;
|
||||
import dev.tommyjs.futur.executor.PromiseExecutor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.redisson.api.RFuture;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -148,21 +146,11 @@ public abstract class AbstractPromiseFactory<F> implements PromiseFactory {
|
||||
return promise;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> @NotNull Promise<T> wrapMono(@NotNull Mono<T> mono) {
|
||||
return wrap(mono.toFuture());
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> @NotNull Promise<T> wrap(@NotNull CompletableFuture<T> future) {
|
||||
return wrap(future, future);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> @NotNull Promise<T> wrapRedisson(@NotNull RFuture<T> future) {
|
||||
return wrap(future, future);
|
||||
}
|
||||
|
||||
private <T> @NotNull Promise<T> wrap(@NotNull CompletionStage<T> completion, Future<T> future) {
|
||||
Promise<T> promise = unresolved();
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@ package dev.tommyjs.futur.promise;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.redisson.api.RFuture;
|
||||
import org.slf4j.Logger;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -89,10 +87,6 @@ public interface PromiseFactory {
|
||||
return race(false, promises);
|
||||
}
|
||||
|
||||
<T> @NotNull Promise<T> wrapMono(@NotNull Mono<T> mono);
|
||||
|
||||
<T> @NotNull Promise<T> wrapRedisson(@NotNull RFuture<T> future);
|
||||
|
||||
<T> @NotNull Promise<T> wrap(@NotNull CompletableFuture<T> future);
|
||||
|
||||
default @NotNull Promise<Void> start() {
|
||||
|
||||
Reference in New Issue
Block a user