Package software.amazon.awssdk.iot
Class V2ClientFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
software.amazon.awssdk.iot.V2ClientFuture<T>
- Type Parameters:
T-
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
CompletableFuture variant used internally to chain from a generic callback to a type-specific callback.
We need to keep the generic future alive from a garbage collection perspective so that its .whenComplete(...)
control flow path will complete this future.
I cannot tell from documentation if this is truly necessary. Does a completion stage have a reference to
its predecessor?
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetTriggeringFuture(CompletableFuture<software.amazon.awssdk.crt.iot.MqttRequestResponse> triggeringFuture) Add a ref to the generic future that will complete this future when it completesMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
Constructor Details
-
V2ClientFuture
public V2ClientFuture()
-
-
Method Details
-
setTriggeringFuture
public void setTriggeringFuture(CompletableFuture<software.amazon.awssdk.crt.iot.MqttRequestResponse> triggeringFuture) Add a ref to the generic future that will complete this future when it completes- Parameters:
triggeringFuture- generic future to keep alive from garbage collection
-