Interface Request<T>
-
- All Superinterfaces:
CompletionStage<T>
- All Known Implementing Classes:
AbstractRequest
,MultiTargetRequest
,SingleSiteRequest
,SingleTargetRequest
,StaggeredRequest
public interface Request<T> extends CompletionStage<T>
A remote command invocation request.- Since:
- 9.1
- Author:
- Dan Berindei
-
-
Field Summary
Fields Modifier and Type Field Description static long
NO_REQUEST_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel(Exception cancellationException)
Complete the request with an exception and release its resources.long
getRequestId()
boolean
onNewView(Set<Address> members)
Called when the node received a new cluster view.void
onResponse(Address sender, Response response)
Called when a response is received for this response.-
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
-
-
-
-
Field Detail
-
NO_REQUEST_ID
static final long NO_REQUEST_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRequestId
long getRequestId()
- Returns:
- The unique request id.
-
onResponse
void onResponse(Address sender, Response response)
Called when a response is received for this response.
-
onNewView
boolean onNewView(Set<Address> members)
Called when the node received a new cluster view.- Returns:
true
if any of the request targets is not in the view.
-
cancel
void cancel(Exception cancellationException)
Complete the request with an exception and release its resources.
-
-