public class RecordCompletableFuture extends CompletableFuture<Void> implements RecordCompletionTracker
RecordCompletionTracker which is also a CompletableFuture.
It will complete once the consumers drops below one.
CompletableFuture.AsynchronousCompletionTask| Constructor and Description |
|---|
RecordCompletableFuture() |
RecordCompletableFuture(CompletableFuture<Void> dependantCallback)
Creates a new instance
|
allOf, anyOf, completedFuture, runAsync, runAsync, supplyAsync, supplyAsyncpublic RecordCompletableFuture()
public RecordCompletableFuture(CompletableFuture<Void> dependantCallback)
dependantCallback - a nullable dependant future. If provided, this instance will also wait for the dependant to
be completed too.public void incrementConsumers()
RecordCompletionTrackerRecord. Because a record can be used in a step at
the same time that it's sitting in the queue of one or many RecordBuffer (aggregators, stepping queues, etc), this
method allows to track how many components depend on a particular instance, so that we know when can we safely release all
the resources currently associated to the record.incrementConsumers in interface RecordCompletionTrackerpublic void decrementConsumers()
RecordCompletionTrackerRecordCompletionTracker.incrementConsumers()decrementConsumers in interface RecordCompletionTrackerpublic boolean isDone()
public Void get() throws InterruptedException, ExecutionException
get in interface Future<Void>get in class CompletableFuture<Void>InterruptedExceptionExecutionExceptionpublic Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Void>get in class CompletableFuture<Void>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic Void join()
join in class CompletableFuture<Void>public Void getNow(Void valueIfAbsent)
getNow in class CompletableFuture<Void>public boolean complete(Void value)
complete in class CompletableFuture<Void>public boolean completeExceptionally(Throwable ex)
completeExceptionally in class CompletableFuture<Void>public <U> CompletableFuture<U> thenApply(Function<? super Void,? extends U> fn)
thenApply in interface CompletionStage<Void>thenApply in class CompletableFuture<Void>public <U> CompletableFuture<U> thenApplyAsync(Function<? super Void,? extends U> fn)
thenApplyAsync in interface CompletionStage<Void>thenApplyAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> thenApplyAsync(Function<? super Void,? extends U> fn, Executor executor)
thenApplyAsync in interface CompletionStage<Void>thenApplyAsync in class CompletableFuture<Void>public CompletableFuture<Void> thenAccept(Consumer<? super Void> action)
thenAccept in interface CompletionStage<Void>thenAccept in class CompletableFuture<Void>public CompletableFuture<Void> thenAcceptAsync(Consumer<? super Void> action)
thenAcceptAsync in interface CompletionStage<Void>thenAcceptAsync in class CompletableFuture<Void>public CompletableFuture<Void> thenAcceptAsync(Consumer<? super Void> action, Executor executor)
thenAcceptAsync in interface CompletionStage<Void>thenAcceptAsync in class CompletableFuture<Void>public CompletableFuture<Void> thenRun(Runnable action)
thenRun in interface CompletionStage<Void>thenRun in class CompletableFuture<Void>public CompletableFuture<Void> thenRunAsync(Runnable action)
thenRunAsync in interface CompletionStage<Void>thenRunAsync in class CompletableFuture<Void>public CompletableFuture<Void> thenRunAsync(Runnable action, Executor executor)
thenRunAsync in interface CompletionStage<Void>thenRunAsync in class CompletableFuture<Void>public <U,V> CompletableFuture<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super Void,? super U,? extends V> fn)
thenCombine in interface CompletionStage<Void>thenCombine in class CompletableFuture<Void>public <U,V> CompletableFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super Void,? super U,? extends V> fn)
thenCombineAsync in interface CompletionStage<Void>thenCombineAsync in class CompletableFuture<Void>public <U,V> CompletableFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super Void,? super U,? extends V> fn, Executor executor)
thenCombineAsync in interface CompletionStage<Void>thenCombineAsync in class CompletableFuture<Void>public <U> CompletableFuture<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super Void,? super U> action)
thenAcceptBoth in interface CompletionStage<Void>thenAcceptBoth in class CompletableFuture<Void>public <U> CompletableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super Void,? super U> action)
thenAcceptBothAsync in interface CompletionStage<Void>thenAcceptBothAsync in class CompletableFuture<Void>public <U> CompletableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super Void,? super U> action, Executor executor)
thenAcceptBothAsync in interface CompletionStage<Void>thenAcceptBothAsync in class CompletableFuture<Void>public CompletableFuture<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
runAfterBoth in interface CompletionStage<Void>runAfterBoth in class CompletableFuture<Void>public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
runAfterBothAsync in interface CompletionStage<Void>runAfterBothAsync in class CompletableFuture<Void>public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterBothAsync in interface CompletionStage<Void>runAfterBothAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> applyToEither(CompletionStage<? extends Void> other, Function<? super Void,U> fn)
applyToEither in interface CompletionStage<Void>applyToEither in class CompletableFuture<Void>public <U> CompletableFuture<U> applyToEitherAsync(CompletionStage<? extends Void> other, Function<? super Void,U> fn)
applyToEitherAsync in interface CompletionStage<Void>applyToEitherAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> applyToEitherAsync(CompletionStage<? extends Void> other, Function<? super Void,U> fn, Executor executor)
applyToEitherAsync in interface CompletionStage<Void>applyToEitherAsync in class CompletableFuture<Void>public CompletableFuture<Void> acceptEither(CompletionStage<? extends Void> other, Consumer<? super Void> action)
acceptEither in interface CompletionStage<Void>acceptEither in class CompletableFuture<Void>public CompletableFuture<Void> acceptEitherAsync(CompletionStage<? extends Void> other, Consumer<? super Void> action)
acceptEitherAsync in interface CompletionStage<Void>acceptEitherAsync in class CompletableFuture<Void>public CompletableFuture<Void> acceptEitherAsync(CompletionStage<? extends Void> other, Consumer<? super Void> action, Executor executor)
acceptEitherAsync in interface CompletionStage<Void>acceptEitherAsync in class CompletableFuture<Void>public CompletableFuture<Void> runAfterEither(CompletionStage<?> other, Runnable action)
runAfterEither in interface CompletionStage<Void>runAfterEither in class CompletableFuture<Void>public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
runAfterEitherAsync in interface CompletionStage<Void>runAfterEitherAsync in class CompletableFuture<Void>public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterEitherAsync in interface CompletionStage<Void>runAfterEitherAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> thenCompose(Function<? super Void,? extends CompletionStage<U>> fn)
thenCompose in interface CompletionStage<Void>thenCompose in class CompletableFuture<Void>public <U> CompletableFuture<U> thenComposeAsync(Function<? super Void,? extends CompletionStage<U>> fn)
thenComposeAsync in interface CompletionStage<Void>thenComposeAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> thenComposeAsync(Function<? super Void,? extends CompletionStage<U>> fn, Executor executor)
thenComposeAsync in interface CompletionStage<Void>thenComposeAsync in class CompletableFuture<Void>public CompletableFuture<Void> whenComplete(BiConsumer<? super Void,? super Throwable> action)
whenComplete in interface CompletionStage<Void>whenComplete in class CompletableFuture<Void>public CompletableFuture<Void> whenCompleteAsync(BiConsumer<? super Void,? super Throwable> action)
whenCompleteAsync in interface CompletionStage<Void>whenCompleteAsync in class CompletableFuture<Void>public CompletableFuture<Void> whenCompleteAsync(BiConsumer<? super Void,? super Throwable> action, Executor executor)
whenCompleteAsync in interface CompletionStage<Void>whenCompleteAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> handle(BiFunction<? super Void,Throwable,? extends U> fn)
handle in interface CompletionStage<Void>handle in class CompletableFuture<Void>public <U> CompletableFuture<U> handleAsync(BiFunction<? super Void,Throwable,? extends U> fn)
handleAsync in interface CompletionStage<Void>handleAsync in class CompletableFuture<Void>public <U> CompletableFuture<U> handleAsync(BiFunction<? super Void,Throwable,? extends U> fn, Executor executor)
handleAsync in interface CompletionStage<Void>handleAsync in class CompletableFuture<Void>public CompletableFuture<Void> toCompletableFuture()
toCompletableFuture in interface CompletionStage<Void>toCompletableFuture in class CompletableFuture<Void>public CompletableFuture<Void> exceptionally(Function<Throwable,? extends Void> fn)
exceptionally in interface CompletionStage<Void>exceptionally in class CompletableFuture<Void>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Void>isCancelled in class CompletableFuture<Void>public boolean isCompletedExceptionally()
isCompletedExceptionally in class CompletableFuture<Void>public void obtrudeValue(Void value)
obtrudeValue in class CompletableFuture<Void>public void obtrudeException(Throwable ex)
obtrudeException in class CompletableFuture<Void>public int getNumberOfDependents()
getNumberOfDependents in class CompletableFuture<Void>public String toString()
toString in class CompletableFuture<Void>Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.