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>
public class V2ClientFuture<T> extends CompletableFuture<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 Constructor Description V2ClientFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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-
Methods 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, 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
-
-
-
-
Method Detail
-
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
-
-