Package io.activej.async
Class AsyncAccumulator<A>
java.lang.Object
io.activej.reactor.AbstractReactive
io.activej.reactor.ImplicitlyReactive
io.activej.async.AsyncAccumulator<A>
- All Implemented Interfaces:
AsyncCloseable,Reactive
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.activej.reactor.AbstractReactive
reactorFields inherited from interface io.activej.async.process.AsyncCloseable
STATIC -
Method Summary
Modifier and TypeMethodDescription<T> voidaddPromise(Promise<T> promise, io.activej.common.function.BiConsumerEx<A, T> consumer) static <A> AsyncAccumulator<A>.Builderbuilder(A accumulator) voidCloses process exceptionally in case an exception is thrown while executing the given process.voidcomplete()voidstatic <A> AsyncAccumulator<A>create(A accumulator) get()int<V> SettablePromise<V>newPromise(io.activej.common.function.BiConsumerEx<A, V> consumer) run()Methods inherited from class io.activej.reactor.AbstractReactive
getReactorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.activej.async.process.AsyncCloseable
close
-
Method Details
-
create
-
builder
-
run
-
run
-
addPromise
-
newPromise
-
get
-
getAccumulator
-
getActivePromises
public int getActivePromises() -
complete
public void complete() -
complete
-
closeEx
Description copied from interface:AsyncCloseableCloses process exceptionally in case an exception is thrown while executing the given process.- Specified by:
closeExin interfaceAsyncCloseable- Parameters:
e- exception that is used to close process with
-