public abstract class Request<T>
extends java.util.concurrent.CompletableFuture<T>
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(java.lang.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(java.lang.String site) |
java.lang.String |
toString() |
abstract void |
transportClosed() |
abstract void |
viewChange(View new_view) |
abstract T |
waitForCompletion() |
abstract T |
waitForCompletion(long timeout,
java.util.concurrent.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 T execute(Buffer data, boolean block_for_results) throws java.lang.Exception
java.lang.Exception
public abstract void sendRequest(Buffer data) throws java.lang.Exception
java.lang.Exception
public abstract void receiveResponse(java.lang.Object response_value, Address sender, boolean is_exception)
public abstract void viewChange(View new_view)
public abstract void siteUnreachable(java.lang.String site)
public abstract void transportClosed()
public abstract T waitForCompletion(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Exception
java.lang.Exception
public abstract T waitForCompletion() throws java.lang.Exception
java.lang.Exception
public boolean cancel(boolean mayInterruptIfRunning)
public java.lang.String toString()
toString
in class java.util.concurrent.CompletableFuture<T>
protected void corrDone()
Copyright © 1998-2020 Red Hat. All Rights Reserved.