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.jgroups.dispatcher.ServiceRequest<T,C>
- Type Parameters:
T- the request return typeC- the marshalling context type
- All Implemented Interfaces:
CompletionStage<T>, Future<T>
public class ServiceRequest<T,C>
extends org.jgroups.blocks.UnicastRequest<T>
Translates a
ServiceResponse response to a CancellationException.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from class CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface Future
Future.State -
Field Summary
Fields inherited from class org.jgroups.blocks.UnicastRequest
targetFields inherited from class org.jgroups.blocks.Request
corr, options, req_id, start_time -
Constructor Summary
ConstructorsConstructorDescriptionServiceRequest(org.jgroups.blocks.RequestCorrelator correlator, org.jgroups.Address target, org.jgroups.blocks.RequestOptions options, C context) Creates a service request. -
Method Summary
Modifier and TypeMethodDescriptionbooleancompleteExceptionally(Throwable exception) get()join()voidreceiveResponse(Object value, org.jgroups.Address sender, boolean exceptional) Methods inherited from class org.jgroups.blocks.UnicastRequest
around, get, getNow, getResult, memberUnreachable, responsesComplete, sendRequest, siteUnreachable, toString, transportClosed, viewChange, waitForCompletion, waitForCompletionMethods inherited from class org.jgroups.blocks.Request
cancel, corrDone, execute, requestId, requestId, setResponseFilterMethods inherited from class CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, 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 Details
-
ServiceRequest
public ServiceRequest(org.jgroups.blocks.RequestCorrelator correlator, org.jgroups.Address target, org.jgroups.blocks.RequestOptions options, C context) Creates a service request.- Parameters:
correlator- a request correlatortarget- the recipient addressoptions- the request optionscontext- the marshalling context.
-
-
Method Details
-
receiveResponse
-
completeExceptionally
- Overrides:
completeExceptionallyin classCompletableFuture<T>
-
get
- Specified by:
getin interfaceFuture<T>- Overrides:
getin classorg.jgroups.blocks.UnicastRequest<T>- Throws:
InterruptedExceptionExecutionException
-
join
-