Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space IceMaster and version 3.7.1

...

  • CompletableFuture<Boolean> whenSent(BiConsumer<Boolean, ? super Throwable> action)
    Configures an action to be executed when the request has been successfully written to the client-side transport. The arguments to the action are a boolean indicating whether the request was sent synchronously (see sentSynchronously above) and a Throwable. The exception argument will be null if the request was sent successfully. The returned stage is completed when the action returns. If the supplied action itself encounters an exception, then the returned stage exceptionally completes with this exception unless this stage also completed exceptionally.  If the invocation is already sent at the time whenSent is called, the callback method is invoked recursively from the calling thread. Otherwise, the callback method is invoked by an Ice thread (or by a dispatcher if one is configured).

  • CompletableFuture<Boolean> whenSentAsync(BiConsumer<Boolean, ? super Throwable> action)
    Behaves like whenSent except the given action is executed asynchronously using this stage's default asynchronous execution facility.

...

  • Suppose you configure an action using whenComplete. If the future is already complete at the time you call whenComplete, the action will execute immediately in the calling thread. If the future is not yet complete when you call whenComplete, the action will eventually execute in an Ice thread pool thread.
  • Now suppose you configure an action using one of the whenCompleteAsync methods. Regardless of the thread in which Ice completes the future, your executor's implementation will determine the thread context in which the action is invoked. The Ice thread pool can be used as an executor; you can obtain the executor by calling the ice_executor proxy method and passing it to whenCompleteAsync. With the Ice thread pool executor, the action is always queued to be executed by the Ice thread pool. If a dispatcher is configured, the action will be passed to the configured dispatcher by the Ice thread pool thread that dequeues it, otherwise the action will be executed by the Ice thread pool thread that dequeues it.

...