protected void clearInProgressMap() {
   for (Tuple<CompletableFuture<Boolean>, byte[], Object> item :
       this.inProgressMessageMap.values()) {
     item.V1.completeExceptionally(
         new Throwable("Connection closed before message acknowledgement received."));
   }
   this.inProgressMessageMap.clear();
 }
 /**
  * Informs the {@link AmqpsTransport} that the message corresponding to the {@link
  * org.apache.qpid.proton.engine.Delivery} {@code hash} has or has not been successfully received
  * by the service using the boolean {@code result}.
  *
  * @param hash The hash code of the {@link org.apache.qpid.proton.engine.Delivery} corresponding
  *     to the message.
  * @param result The boolean result status of the sent message.
  */
 protected synchronized void acknowledge(int hash, boolean result) {
   Tuple<CompletableFuture<Boolean>, byte[], Object> item = inProgressMessageMap.remove(hash);
   item.V1.complete(new Boolean(result));
   // If the message queue has been successfully exhausted, complete the completionStatus future
   // successfully.
 }