Package org.jgroups.blocks
Class Request<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
org.jgroups.blocks.Request<T>
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
- Direct Known Subclasses:
GroupRequest,UnicastRequest
Abstract class for a unicast or multicast request
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RequestCorrelatorprotected final RequestOptionsprotected longprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) protected voidcorrDone()abstract voidmemberUnreachable(Address mbr) abstract voidreceiveResponse(Object response_value, Address sender, boolean is_exception) longrequestId(long req_id) abstract voidsendRequest(Message req) setResponseFilter(RspFilter filter) abstract voidsiteUnreachable(String site) toString()abstract voidabstract voidviewChange(View new_view, boolean handle_previous_subgroups) abstract Tabstract TwaitForCompletion(long timeout, TimeUnit unit) Blocks until all responses have been received and returns result or throws exceptionMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, 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
-
Field Details
-
req_id
protected long req_id -
corr
-
options
-
start_time
protected long start_time
-
-
Constructor Details
-
Request
-
-
Method Details
-
requestId
-
requestId
public long requestId() -
setResponseFilter
-
execute
- Throws:
Exception
-
sendRequest
- Throws:
Exception
-
receiveResponse
-
viewChange
-
siteUnreachable
-
memberUnreachable
-
transportClosed
public abstract void transportClosed() -
waitForCompletion
Blocks until all responses have been received and returns result or throws exception- Throws:
Exception
-
waitForCompletion
- Throws:
Exception
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
toString
- Overrides:
toStringin classCompletableFuture<T>
-
corrDone
protected void corrDone()
-