public class UnicastRequest<T> extends Request
| Modifier and Type | Field and Description |
|---|---|
protected int |
num_received |
protected Rsp<T> |
result |
protected Address |
target |
| Constructor and Description |
|---|
UnicastRequest(RequestCorrelator corr,
Address target,
RequestOptions options) |
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
T |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
Rsp<T> |
getResult() |
T |
getValue() |
void |
receiveResponse(java.lang.Object response_value,
Address sender,
boolean is_exception)
Callback (called by RequestCorrelator or Transport).
|
boolean |
responseReceived() |
protected boolean |
responsesComplete() |
protected void |
sendRequest(Message request_msg) |
void |
siteUnreachable(java.lang.String site) |
void |
suspect(Address suspected_member)
Callback (called by RequestCorrelator or Transport).
|
java.lang.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 not received and unblock
the caller of execute()
|
cancel, checkCompletion, corrDone, execute, getResponsesComplete, isCancelled, isDone, isMet, requestId, requestId, responsesComplete, setListener, setResponseFilter, waitForResultsprotected final Address target
protected int num_received
public UnicastRequest(RequestCorrelator corr, Address target, RequestOptions options)
protected void sendRequest(Message request_msg) throws java.lang.Exception
sendRequest in class Requestjava.lang.Exceptionpublic void receiveResponse(java.lang.Object response_value,
Address sender,
boolean is_exception)
execute() returns.receiveResponse in class Requestpublic boolean responseReceived()
public void suspect(Address suspected_member)
GroupRequest that a member is reported as faulty (suspected).
This method would probably be called when getting a suspect message from a failure detector
(where available). It is used to exclude faulty members from the response list.public void siteUnreachable(java.lang.String site)
siteUnreachable in class Requestpublic void viewChange(View view)
viewChange in class Requestpublic void transportClosed()
transportClosed in class Requestpublic T getValue() throws java.util.concurrent.ExecutionException
java.util.concurrent.ExecutionExceptionpublic T get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionprotected boolean responsesComplete()
responsesComplete in class RequestCopyright © 1998-2020 Red Hat. All Rights Reserved.