public interface ClosableFifoQueue<T> extends FifoQueue<T>
This interface defines a FIFO queue that can be open and closed to control the addition of elements to the queue. When the queue is opened it is possible to add new elements to the queue. When the queue is closed, it is should not be possible to add elements to the queue. It should always be possible to read elements from the queue, so long as it is not empty.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes a currently open queue.
|
boolean |
isClosed()
Returns true if the queue is currently closed.
|
boolean |
isOpen()
Returns true if the queue is currently open.
|
void |
open()
Ensures that the queue is open and new elements can be added to the
queue.
|
boolean isOpen()
T
- a T object.boolean isClosed()
void close() throws FifoQueueException
FifoQueueException
- Thrown if an error occurs closing the queue.FifoQueueException
- if any.void open() throws FifoQueueException
FifoQueueException
- Thrown if an error occurs opening the queue.FifoQueueException
- if any.Copyright © 2015. All Rights Reserved.