public class MultiTargetRequest<T> extends AbstractRequest<T>
CompletableFuture.AsynchronousCompletionTask
repository, requestId, responseCollector
NO_REQUEST_ID
Constructor and Description |
---|
MultiTargetRequest(ResponseCollector<T> responseCollector,
long requestId,
RequestRepository repository,
Collection<Address> targets,
Address excluded) |
Modifier and Type | Method and Description |
---|---|
protected Address |
getTarget(int i) |
protected int |
getTargetsSize() |
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.
|
protected void |
onTimeout()
Called when the timeout task scheduled with
AbstractRequest.setTimeout(ScheduledExecutorService, long, TimeUnit) expires. |
call, cancel, cancel, complete, completeExceptionally, getRequestId, setTimeout
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completedFuture, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public MultiTargetRequest(ResponseCollector<T> responseCollector, long requestId, RequestRepository repository, Collection<Address> targets, Address excluded)
protected int getTargetsSize()
protected Address getTarget(int i)
i
, or null
if a response was already added for target i
.public void onResponse(Address sender, Response response)
Request
public boolean onNewView(Set<Address> members)
Request
true
if any of the request targets is not in the view.protected void onTimeout()
AbstractRequest
AbstractRequest.setTimeout(ScheduledExecutorService, long, TimeUnit)
expires.onTimeout
in class AbstractRequest<T>
Copyright © 2021 JBoss by Red Hat. All rights reserved.