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?
  • 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