Interface DoubleSendPort
- 
- All Superinterfaces:
- java.lang.AutoCloseable,- Port<java.lang.Double>,- PortAutoCloseable,- SendPort<java.lang.Double>
 - All Known Subinterfaces:
- DoubleChannel
 - All Known Implementing Classes:
- QueueDoubleChannel
 
 public interface DoubleSendPort extends SendPort<java.lang.Double> A primitivedoublechannel's producer-side interface.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsend(double message)Sends a message to the channel, possibly blocking until there's room available in the channel.booleansend(double message, long timeout, java.util.concurrent.TimeUnit unit)Sends a message to the channel, possibly blocking until there's room available in the channel, but never longer than the specified timeout.booleansend(double message, Timeout timeout)Sends a message to the channel, possibly blocking until there's room available in the channel, but never longer than the specified timeout.booleantrySend(double message)Sends a message to the channel if the channel has room available.- 
Methods inherited from interface co.paralleluniverse.strands.channels.PortAutoCloseableclose, isClosed
 
- 
 
- 
- 
- 
Method Detail- 
sendvoid send(double message) throws SuspendExecution, java.lang.InterruptedException Sends a message to the channel, possibly blocking until there's room available in the channel. If the channel is full, this method may block, throw an exception, silently drop the message, or displace an old message from the channel. The behavior is determined by the channel'sOverflowPolicy, set at construction time.- Parameters:
- message-
- Throws:
- SuspendExecution
- java.lang.InterruptedException
 
 - 
sendboolean send(double message, long timeout, java.util.concurrent.TimeUnit unit) throws SuspendExecution, java.lang.InterruptedException, java.util.concurrent.TimeoutExceptionSends a message to the channel, possibly blocking until there's room available in the channel, but never longer than the specified timeout. If the channel is full, this method may block, throw an exception, silently drop the message, or displace an old message from the channel. The behavior is determined by the channel'sOverflowPolicy, set at construction time.- Parameters:
- message-
- timeout- the maximum duration this method is allowed to wait.
- unit- the timeout's time unit
- Returns:
- trueif the message has been sent successfully;- falseif the timeout has expired.
- Throws:
- SuspendExecution
- java.lang.InterruptedException
- java.util.concurrent.TimeoutException
 
 - 
sendboolean send(double message, Timeout timeout) throws SuspendExecution, java.lang.InterruptedException, java.util.concurrent.TimeoutExceptionSends a message to the channel, possibly blocking until there's room available in the channel, but never longer than the specified timeout. If the channel is full, this method may block, throw an exception, silently drop the message, or displace an old message from the channel. The behavior is determined by the channel'sOverflowPolicy, set at construction time.- Parameters:
- message-
- timeout- the method will not block for longer than the amount remaining in the- Timeout
- Returns:
- trueif the message has been sent successfully;- falseif the timeout has expired.
- Throws:
- SuspendExecution
- java.lang.InterruptedException
- java.util.concurrent.TimeoutException
 
 - 
trySendboolean trySend(double message) Sends a message to the channel if the channel has room available. This method never blocks.- Parameters:
- message-
- Returns:
- trueif the message has been sent;- falseotherwise.
 
 
- 
 
-