public interface NotifiableInputFifoQueue<T> extends FifoQueue<T>
This interface is implemented by FIFO queue implementations that can notify interested listener when elements are added to the queue. This is useful for listeners that may block or preform other work while a queue is empty, instead of using polling.
Modifier and Type | Method and Description |
---|---|
void |
addInputListener(InputFifoQueueListener<T> listener)
Adds a new listener to the notifiable queue.
|
void |
removeInputListener(InputFifoQueueListener<T> listener)
Removes an already registered listener.
|
void addInputListener(InputFifoQueueListener<T> listener)
callback
method invoked.listener
- The instance to be notified on queue additions.void removeInputListener(InputFifoQueueListener<T> listener)
listener
- The listener to remove from the queue.Copyright © 2015. All Rights Reserved.