public class UnicastRequest<T> extends Request
Modifier and Type | Field and Description |
---|---|
protected Rsp<T> |
result |
protected Address |
target |
block_for_results, completed, corr, done, GET_ABS_MAJORITY, GET_ALL, GET_FIRST, GET_MAJORITY, GET_N, GET_NONE, listener, lock, log, options, req_id, REQUEST_ID, request_msg, transport
Constructor and Description |
---|
UnicastRequest(Message m,
RequestCorrelator corr,
Address target,
RequestOptions options) |
UnicastRequest(Message m,
Transport transport,
Address target,
RequestOptions options) |
Modifier and Type | Method and Description |
---|---|
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
Rsp |
getResult() |
void |
receiveResponse(Object response_value,
Address sender)
Callback (called by RequestCorrelator or Transport).
|
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, modeToString, responsesComplete, setBlockForResults, setListener, setResponseFilter, waitForResults
public UnicastRequest(Message m, RequestCorrelator corr, Address target, RequestOptions options)
timeout
- Time to wait for responses (ms). A value of <= 0 means wait indefinitely
(e.g. if a suspicion service is available; timeouts are not needed).public UnicastRequest(Message m, Transport transport, Address target, RequestOptions options)
timeout
- Time to wait for responses (ms). A value of <= 0 means wait indefinitely
(e.g. if a suspicion service is available; timeouts are not needed).protected void sendRequest() throws Exception
sendRequest
in class Request
Exception
public void receiveResponse(Object response_value, Address sender)
execute()
returns.receiveResponse
in interface RspCollector
receiveResponse
in class Request
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 Rsp getResult()
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 © 2013 JBoss, a division of Red Hat. All Rights Reserved.