refactoring

pull/5937/head
Nikita Koksharov 8 months ago
parent 56a4131183
commit 17f8ea3e0e

@ -51,6 +51,7 @@ public class ElementsSubscribeService {
return id;
}
@Deprecated
public <V> int subscribeOnElements(Supplier<CompletionStage<V>> func, Consumer<V> consumer) {
int id = System.identityHashCode(consumer);
CompletableFuture<?> currentFuture = subscribeListeners.putIfAbsent(id, CompletableFuture.completedFuture(null));
@ -68,6 +69,7 @@ public class ElementsSubscribeService {
}
}
@Deprecated
private <V> void resubscribe(Supplier<CompletionStage<V>> func, Consumer<V> consumer) {
int listenerId = System.identityHashCode(consumer);
CompletionStage<V> f = (CompletionStage<V>) subscribeListeners.computeIfPresent(listenerId, (k, v) -> {

Loading…
Cancel
Save