public class UnicastRequest<T> extends Request
Modifier and Type | Field and Description |
---|---|
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
Constructor and Description |
---|
UnicastRequest(Message msg,
Address target,
RequestOptions options) |
UnicastRequest(Message msg,
RequestCorrelator corr,
Address target,
RequestOptions options) |
Modifier and Type | Method and Description |
---|---|
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
Rsp<T> |
getResult() |
T |
getValue() |
void |
receiveResponse(Object response_value,
Address sender,
boolean is_exception)
Callback (called by RequestCorrelator or Transport).
|
boolean |
responseReceived() |
protected boolean |
responsesComplete() |
protected void |
sendRequest() |
void |
suspect(Address suspected_member)
Callback (called by RequestCorrelator or Transport).
|
String |
toString() |
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, waitForResults
protected 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 Exception
sendRequest
in class Request
Exception
public void receiveResponse(Object response_value, Address sender, boolean is_exception)
execute()
returns.receiveResponse
in interface RspCollector
receiveResponse
in class Request
public 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
in interface RspCollector
suspect
in class Request
public void viewChange(View new_view)
viewChange
in interface RspCollector
viewChange
in class Request
public T getValue() throws ExecutionException
ExecutionException
public T get() throws InterruptedException, ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
protected boolean responsesComplete()
responsesComplete
in class Request
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.