Class ServiceRequest<T,C>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<T>
-
- org.jgroups.blocks.Request<T>
-
- org.jgroups.blocks.UnicastRequest<T>
-
- org.wildfly.clustering.server.infinispan.dispatcher.ServiceRequest<T,C>
-
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
public class ServiceRequest<T,C> extends org.jgroups.blocks.UnicastRequest<T>Translates aNoSuchServiceresponse to aCancellationException.- Author:
- Paul Ferraro
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
Constructor Summary
Constructors Constructor Description ServiceRequest(org.jgroups.blocks.RequestCorrelator correlator, org.jgroups.Address target, org.jgroups.blocks.RequestOptions options, C context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompleteExceptionally(Throwable exception)Tget()Tjoin()voidreceiveResponse(Object value, org.jgroups.Address sender, boolean exceptional)CompletionStage<T>send(org.jgroups.util.Buffer data)-
Methods inherited from class org.jgroups.blocks.UnicastRequest
around, get, getNow, getResult, responsesComplete, sendRequest, siteUnreachable, toString, transportClosed, viewChange, waitForCompletion, waitForCompletion
-
Methods inherited from class org.jgroups.blocks.Request
cancel, corrDone, execute, requestId, requestId, setResponseFilter
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, 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, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Constructor Detail
-
ServiceRequest
public ServiceRequest(org.jgroups.blocks.RequestCorrelator correlator, org.jgroups.Address target, org.jgroups.blocks.RequestOptions options, C context)
-
-
Method Detail
-
send
public CompletionStage<T> send(org.jgroups.util.Buffer data) throws org.wildfly.clustering.dispatcher.CommandDispatcherException
- Throws:
org.wildfly.clustering.dispatcher.CommandDispatcherException
-
receiveResponse
public void receiveResponse(Object value, org.jgroups.Address sender, boolean exceptional)
- Overrides:
receiveResponsein classorg.jgroups.blocks.UnicastRequest<T>
-
completeExceptionally
public boolean completeExceptionally(Throwable exception)
- Overrides:
completeExceptionallyin classCompletableFuture<T>
-
get
public T get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<T>- Overrides:
getin classorg.jgroups.blocks.UnicastRequest<T>- Throws:
InterruptedExceptionExecutionException
-
-