Class MultiTargetRequest<T>
- java.lang.Object
- 
- java.util.concurrent.CompletableFuture<T>
- 
- org.infinispan.remoting.transport.AbstractRequest<T>
- 
- org.infinispan.remoting.transport.impl.MultiTargetRequest<T>
 
 
 
- 
- All Implemented Interfaces:
- Callable<Void>,- CompletionStage<T>,- Future<T>,- Request<T>
 - Direct Known Subclasses:
- StaggeredRequest
 
 public class MultiTargetRequest<T> extends AbstractRequest<T> Request implementation that waits for responses from multiple target nodes.- Since:
- 9.1
- Author:
- Dan Berindei
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFutureCompletableFuture.AsynchronousCompletionTask
 
- 
 - 
Field Summary- 
Fields inherited from class org.infinispan.remoting.transport.AbstractRequestrepository, requestId, responseCollector
 - 
Fields inherited from interface org.infinispan.remoting.transport.impl.RequestNO_REQUEST_ID
 
- 
 - 
Constructor SummaryConstructors Constructor Description MultiTargetRequest(ResponseCollector<T> responseCollector, long requestId, RequestRepository repository, Collection<Address> targets, Address excluded)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AddressgetTarget(int i)protected intgetTargetsSize()booleanonNewView(Set<Address> members)Called when the node received a new cluster view.voidonResponse(Address sender, Response response)Called when a response is received for this response.protected voidonTimeout()Called when the timeout task scheduled withAbstractRequest.setTimeout(ScheduledExecutorService, long, TimeUnit)expires.- 
Methods inherited from class org.infinispan.remoting.transport.AbstractRequestcall, cancel, cancel, complete, completeExceptionally, getRequestId, setTimeout
 - 
Methods inherited from class java.util.concurrent.CompletableFutureacceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, 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, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.util.concurrent.CompletionStageacceptEither, 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
 
- 
 
- 
- 
- 
Constructor Detail- 
MultiTargetRequestpublic MultiTargetRequest(ResponseCollector<T> responseCollector, long requestId, RequestRepository repository, Collection<Address> targets, Address excluded) 
 
- 
 - 
Method Detail- 
getTargetsSizeprotected int getTargetsSize() 
 - 
getTargetprotected Address getTarget(int i) - Returns:
- target i, ornullif a response was already added for targeti.
 
 - 
onResponsepublic void onResponse(Address sender, Response response) Description copied from interface:RequestCalled when a response is received for this response.
 - 
onNewViewpublic boolean onNewView(Set<Address> members) Description copied from interface:RequestCalled when the node received a new cluster view.- Returns:
- trueif any of the request targets is not in the view.
 
 - 
onTimeoutprotected void onTimeout() Description copied from class:AbstractRequestCalled when the timeout task scheduled withAbstractRequest.setTimeout(ScheduledExecutorService, long, TimeUnit)expires.- Specified by:
- onTimeoutin class- AbstractRequest<T>
 
 
- 
 
-