public interface DoubleReceivePort extends ReceivePort<java.lang.Double>
double channel's consumer-side interface.
All methods of this interface must only be called by the channel's owner.ReceivePort.EOFException| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMessage()
Tests whether a value is pending in the channel.
|
double |
receiveDouble()
Retrieves a message from the channels, possibly blocking until one becomes available.
|
double |
receiveDouble(long timeout,
java.util.concurrent.TimeUnit unit)
Retrieves a message from the channels, possibly blocking until one becomes available, but no longer than the specified timeout.
|
double |
receiveDouble(Timeout timeout)
Retrieves a message from the channels, possibly blocking until one becomes available, but no longer than the specified timeout.
|
receive, receive, receive, tryReceiveclose, isCloseddouble receiveDouble()
throws SuspendExecution,
java.lang.InterruptedException,
ReceivePort.EOFException
ReceivePort.EOFException.ReceivePort.EOFException - if the channel has been closed and no more messages awaitjava.lang.InterruptedExceptionSuspendExecutiondouble receiveDouble(long timeout,
java.util.concurrent.TimeUnit unit)
throws SuspendExecution,
java.lang.InterruptedException,
java.util.concurrent.TimeoutException,
ReceivePort.EOFException
ReceivePort.EOFException.timeout - the maximum duration to block waiting for a message.unit - the time unit of the timeout.PortAutoCloseable.isClosed()), or if the timeout has expired.java.util.concurrent.TimeoutException - if the timeout has expiredReceivePort.EOFException - if the channel has been closed and no more messages awaitjava.lang.InterruptedExceptionSuspendExecutiondouble receiveDouble(Timeout timeout) throws SuspendExecution, java.lang.InterruptedException, java.util.concurrent.TimeoutException, ReceivePort.EOFException
ReceivePort.EOFException.timeout - the method will not block for longer than the amount remaining in the TimeoutPortAutoCloseable.isClosed()), or if the timeout has expired.java.util.concurrent.TimeoutException - if the timeout has expiredReceivePort.EOFException - if the channel has been closed and no more messages awaitjava.lang.InterruptedExceptionSuspendExecutionboolean hasMessage()
receiveDouble is guaranteed not to block.true if a value is waiting in the channel; false otherwise.