Class 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 Detail

      • V2ClientFuture

        public V2ClientFuture()
    • 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