public class UnicastRequest<T> extends Request<T>
CompletableFuture.AsynchronousCompletionTask
Modifier and Type | Field and Description |
---|---|
protected Address |
target |
corr, options, req_id, start_time
Constructor and Description |
---|
UnicastRequest(RequestCorrelator corr,
Address target,
RequestOptions options) |
Modifier and Type | Method and Description |
---|---|
protected T |
around(Supplier<T> supplier) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
T |
getNow(T valueIfAbsent) |
protected T |
getResult(Callable<T> supplier) |
T |
join() |
void |
receiveResponse(Object response_value,
Address sender,
boolean is_exception)
Callback (called by RequestCorrelator or Transport).
|
boolean |
responsesComplete() |
void |
sendRequest(Buffer data) |
void |
siteUnreachable(String site) |
String |
toString() |
void |
transportClosed() |
void |
viewChange(View view)
If the target address is not a member of the new view, we'll mark the response as suspected and unblock
the caller of execute()
|
T |
waitForCompletion() |
T |
waitForCompletion(long timeout,
TimeUnit unit)
Blocks until all responses have been received and returns result or throws exception
|
cancel, corrDone, execute, requestId, requestId, setResponseFilter
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completedFuture, completeExceptionally, exceptionally, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, 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, whenComplete, whenCompleteAsync, whenCompleteAsync
protected final Address target
public UnicastRequest(RequestCorrelator corr, Address target, RequestOptions options)
public void sendRequest(Buffer data) throws Exception
sendRequest
in class Request<T>
Exception
public void receiveResponse(Object response_value, Address sender, boolean is_exception)
execute()
returns.receiveResponse
in class Request<T>
public void siteUnreachable(String site)
siteUnreachable
in class Request<T>
public void viewChange(View view)
viewChange
in class Request<T>
public void transportClosed()
transportClosed
in class Request<T>
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
get
in class CompletableFuture<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
get
in class CompletableFuture<T>
InterruptedException
ExecutionException
TimeoutException
public T join()
join
in class CompletableFuture<T>
public T getNow(T valueIfAbsent)
getNow
in class CompletableFuture<T>
public T waitForCompletion(long timeout, TimeUnit unit) throws Exception
Request
waitForCompletion
in class Request<T>
Exception
public T waitForCompletion() throws Exception
waitForCompletion
in class Request<T>
Exception
public boolean responsesComplete()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.