Class StaggeredRequest<T>

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Void>, java.util.concurrent.CompletionStage<T>, java.util.concurrent.Future<T>, org.infinispan.remoting.transport.impl.Request<T>

    public class StaggeredRequest<T>
    extends org.infinispan.remoting.transport.impl.MultiTargetRequest<T>
    Since:
    9.1
    Author:
    Dan Berindei
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture

        java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onResponse​(Address sender, Response response)
      Called when a response is received for this response.
      protected void onTimeout()
      Called when the timeout task scheduled with AbstractRequest.setTimeout(ScheduledExecutorService, long, TimeUnit) expires.
      void setTimeout​(java.util.concurrent.ScheduledExecutorService timeoutExecutor, long timeout, java.util.concurrent.TimeUnit unit)
      Schedule a timeout task on the given executor, and complete the request with a TimeoutException when the task runs.
      • Methods inherited from class org.infinispan.remoting.transport.impl.MultiTargetRequest

        getTarget, getTargetsSize, onNewView
      • Methods inherited from class java.util.concurrent.CompletableFuture

        acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completeAsync, completeAsync, completedFuture, completedStage, 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.CompletionStage

        acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
    • Method Detail

      • setTimeout

        public void setTimeout​(java.util.concurrent.ScheduledExecutorService timeoutExecutor,
                               long timeout,
                               java.util.concurrent.TimeUnit unit)
        Description copied from class: AbstractRequest
        Schedule a timeout task on the given executor, and complete the request with a TimeoutException when the task runs. If a timeout task was already registered with this request, it is cancelled.
        Overrides:
        setTimeout in class AbstractRequest<T>
      • onResponse

        public void onResponse​(Address sender,
                               Response response)
        Description copied from interface: org.infinispan.remoting.transport.impl.Request
        Called when a response is received for this response.
        Specified by:
        onResponse in interface org.infinispan.remoting.transport.impl.Request<T>
        Overrides:
        onResponse in class org.infinispan.remoting.transport.impl.MultiTargetRequest<T>