Class XSiteResponseImpl<O>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<O>
-
- org.infinispan.remoting.transport.impl.XSiteResponseImpl<O>
-
- All Implemented Interfaces:
CompletionStage<O>
,Future<O>
,BiConsumer<ValidResponse,Throwable>
,XSiteResponse<O>
public class XSiteResponseImpl<O> extends CompletableFuture<O> implements XSiteResponse<O>, BiConsumer<ValidResponse,Throwable>
Default implementation ofXSiteResponse
.It implements
BiConsumer
in order to be notified when theSingleSiteRequest
is completed.- Since:
- 10.0
- Author:
- Pedro Ruivo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
Nested classes/interfaces inherited from interface org.infinispan.remoting.transport.XSiteResponse
XSiteResponse.XSiteResponseCompleted
-
-
Constructor Summary
Constructors Constructor Description XSiteResponseImpl(TimeService timeService, org.infinispan.xsite.XSiteBackup xSiteBackup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ValidResponse response, Throwable throwable)
void
whenCompleted(XSiteResponse.XSiteResponseCompleted xSiteResponseCompleted)
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, 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.function.BiConsumer
andThen
-
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
-
-
-
-
Constructor Detail
-
XSiteResponseImpl
public XSiteResponseImpl(TimeService timeService, org.infinispan.xsite.XSiteBackup xSiteBackup)
-
-
Method Detail
-
whenCompleted
public void whenCompleted(XSiteResponse.XSiteResponseCompleted xSiteResponseCompleted)
- Specified by:
whenCompleted
in interfaceXSiteResponse<O>
-
accept
public void accept(ValidResponse response, Throwable throwable)
- Specified by:
accept
in interfaceBiConsumer<ValidResponse,Throwable>
-
-