public abstract class Request<T> extends CompletableFuture<T>
CompletableFuture.AsynchronousCompletionTask
Modifier and Type | Field and Description |
---|---|
protected RequestCorrelator |
corr |
protected RequestOptions |
options |
protected long |
req_id |
protected long |
start_time |
Constructor and Description |
---|
Request(RequestCorrelator corr,
RequestOptions options) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected void |
corrDone() |
T |
execute(Buffer data,
boolean block_for_results) |
abstract void |
receiveResponse(Object response_value,
Address sender,
boolean is_exception) |
long |
requestId() |
Request<T> |
requestId(long req_id) |
abstract void |
sendRequest(Buffer data) |
Request |
setResponseFilter(RspFilter filter) |
abstract void |
siteUnreachable(String site) |
String |
toString() |
abstract void |
transportClosed() |
abstract void |
viewChange(View new_view) |
abstract T |
waitForCompletion() |
abstract T |
waitForCompletion(long timeout,
TimeUnit unit)
Blocks until all responses have been received and returns result or throws exception
|
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completedFuture, completeExceptionally, 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, whenComplete, whenCompleteAsync, whenCompleteAsync
protected long req_id
protected final RequestCorrelator corr
protected final RequestOptions options
protected long start_time
public Request(RequestCorrelator corr, RequestOptions options)
public long requestId()
public abstract void receiveResponse(Object response_value, Address sender, boolean is_exception)
public abstract void viewChange(View new_view)
public abstract void siteUnreachable(String site)
public abstract void transportClosed()
public abstract T waitForCompletion(long timeout, TimeUnit unit) throws Exception
Exception
public boolean cancel(boolean mayInterruptIfRunning)
public String toString()
toString
in class CompletableFuture<T>
protected void corrDone()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.