Class TickerChannelConsumer.TickerChannelFloatConsumer
- java.lang.Object
-
- co.paralleluniverse.strands.channels.TickerChannelConsumer<java.lang.Float>
-
- co.paralleluniverse.strands.channels.TickerChannelConsumer.TickerChannelFloatConsumer
-
- All Implemented Interfaces:
FloatReceivePort
,Port<java.lang.Float>
,PortAutoCloseable
,ReceivePort<java.lang.Float>
,Selectable<java.lang.Float>
,java.lang.AutoCloseable
- Enclosing class:
- TickerChannelConsumer<Message>
public static class TickerChannelConsumer.TickerChannelFloatConsumer extends TickerChannelConsumer<java.lang.Float> implements FloatReceivePort
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class co.paralleluniverse.strands.channels.TickerChannelConsumer
TickerChannelConsumer.TickerChannelFloatConsumer
-
Nested classes/interfaces inherited from interface co.paralleluniverse.strands.channels.ReceivePort
ReceivePort.EOFException
-
-
Constructor Summary
Constructors Constructor Description TickerChannelFloatConsumer(QueueFloatChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
receiveFloat()
Retrieves a message from the channels, possibly blocking until one becomes available.float
receiveFloat(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.float
receiveFloat(Timeout timeout)
Retrieves a message from the channels, possibly blocking until one becomes available, but no longer than the specified timeout.-
Methods inherited from class co.paralleluniverse.strands.channels.TickerChannelConsumer
checkClosed, close, getLastIndexRead, hasMessage, isClosed, receive, receive, receive, register, tryNow, tryReceive, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface co.paralleluniverse.strands.channels.FloatReceivePort
hasMessage
-
Methods inherited from interface co.paralleluniverse.strands.channels.PortAutoCloseable
close, isClosed
-
Methods inherited from interface co.paralleluniverse.strands.channels.ReceivePort
receive, receive, receive, tryReceive
-
-
-
-
Constructor Detail
-
TickerChannelFloatConsumer
public TickerChannelFloatConsumer(QueueFloatChannel channel)
-
-
Method Detail
-
receiveFloat
public float receiveFloat() throws SuspendExecution, java.lang.InterruptedException, ReceivePort.EOFException
Description copied from interface:FloatReceivePort
Retrieves a message from the channels, possibly blocking until one becomes available. If the channel has been closed and no more messages await, this method throws anReceivePort.EOFException
.- Specified by:
receiveFloat
in interfaceFloatReceivePort
- Returns:
- a message.
- Throws:
java.lang.InterruptedException
ReceivePort.EOFException
- if the channel has been closed and no more messages awaitSuspendExecution
-
receiveFloat
public float receiveFloat(long timeout, java.util.concurrent.TimeUnit unit) throws SuspendExecution, java.lang.InterruptedException, java.util.concurrent.TimeoutException, ReceivePort.EOFException
Description copied from interface:FloatReceivePort
Retrieves a message from the channels, possibly blocking until one becomes available, but no longer than the specified timeout. If the channel has been closed and no more messages await, this method throws anReceivePort.EOFException
.- Specified by:
receiveFloat
in interfaceFloatReceivePort
- Parameters:
timeout
- the maximum duration to block waiting for a message.unit
- the time unit of the timeout.- Returns:
- a message. (see
PortAutoCloseable.isClosed()
), or if the timeout has expired. - Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
- if the timeout has expiredReceivePort.EOFException
- if the channel has been closed and no more messages awaitSuspendExecution
-
receiveFloat
public float receiveFloat(Timeout timeout) throws SuspendExecution, java.lang.InterruptedException, java.util.concurrent.TimeoutException, ReceivePort.EOFException
Description copied from interface:FloatReceivePort
Retrieves a message from the channels, possibly blocking until one becomes available, but no longer than the specified timeout. If the channel has been closed and no more messages await, this method throws anReceivePort.EOFException
.- Specified by:
receiveFloat
in interfaceFloatReceivePort
- Parameters:
timeout
- the method will not block for longer than the amount remaining in theTimeout
- Returns:
- a message. (see
PortAutoCloseable.isClosed()
), or if the timeout has expired. - Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
- if the timeout has expiredReceivePort.EOFException
- if the channel has been closed and no more messages awaitSuspendExecution
-
-