public class UnicastRequest<T> extends Request
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
num_received |
protected Rsp<T> |
result |
protected Address |
target |
block_for_results, completed, corr, done, listener, lock, log, options, req_id, REQUEST_ID, request_msg| 构造器和说明 |
|---|
UnicastRequest(Message msg,
Address target,
RequestOptions options) |
UnicastRequest(Message msg,
RequestCorrelator corr,
Address target,
RequestOptions options) |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
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 new_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, execute, getBlockForResults, getRequestId, getResponsesComplete, isCancelled, isDone, responsesComplete, setBlockForResults, setListener, setResponseFilter, waitForResultsprotected final Address target
protected int num_received
public UnicastRequest(Message msg, RequestCorrelator corr, Address target, RequestOptions options)
public UnicastRequest(Message msg, Address target, RequestOptions options)
protected void sendRequest()
throws java.lang.Exception
sendRequest 在类中 Requestjava.lang.Exceptionpublic void receiveResponse(java.lang.Object response_value,
Address sender,
boolean is_exception)
execute() returns.receiveResponse 在接口中 RspCollectorreceiveResponse 在类中 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.suspect 在接口中 RspCollectorsuspect 在类中 Requestpublic void siteUnreachable(java.lang.String site)
siteUnreachable 在接口中 RspCollectorsiteUnreachable 在类中 Requestpublic void viewChange(View new_view)
viewChange 在接口中 RspCollectorviewChange 在类中 Requestpublic void transportClosed()
public 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 在类中 Request