V - The type of expected reply messageprivate static class MessageStream.ResultWaiter<V> extends MessageStream
MessageStream.RemoteMessageStream, MessageStream.SendTo| Modifier and Type | Field and Description |
|---|---|
private boolean |
isSet |
private static long |
serialVersionUID |
private java.lang.Object |
value
Holds a reference to the calling thread, while waiting, and the received reply message, once it has arrived.
|
serialHandle| Modifier | Constructor and Description |
|---|---|
private |
ResultWaiter() |
| Modifier and Type | Method and Description |
|---|---|
V |
getResult()
Retrieves the response blocking until a message arrives
|
java.lang.Object |
getResult(long timeout,
java.util.concurrent.TimeUnit units)
Retrieves the response blocking until a message arrives
|
void |
onDeliveryError(java.lang.Object msg)
Handle cases when the message sent to the actor doesn't get delivered
|
private void |
rethrowException() |
MessageStream |
send(java.lang.Object message)
Accepts the message as a reply and wakes up the sleeping thread.
|
call, getRemoteClass, leftShift, reInterrupt, send, send, sendAndWait, sendAndWait, sendAndWaitcreateRemoteHandle, getOrCreateSerialHandle, writeReplaceprivate static final long serialVersionUID
private volatile java.lang.Object value
private volatile boolean isSet
public MessageStream send(java.lang.Object message)
send in class MessageStreammessage - message to sendpublic V getResult() throws java.lang.InterruptedException
java.lang.InterruptedException - If the thread gets interruptedpublic java.lang.Object getResult(long timeout,
java.util.concurrent.TimeUnit units)
throws java.lang.InterruptedException
timeout - How long to waitunits - Unit for the timeoutjava.lang.InterruptedException - If the thread gets interruptedprivate void rethrowException()
public void onDeliveryError(java.lang.Object msg)
msg - The message that failed to get delivered