OpenNMS API 1.2.3

org.opennms.core.queue
Interface ClosableFifoQueue

All Superinterfaces:
FifoQueue
All Known Implementing Classes:
RunnableConsumerThreadPool.SizingFifoQueue

public interface ClosableFifoQueue
extends FifoQueue

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.

Author:
Brian Weaver , OpenNMS

Method Summary
 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.
 
Methods inherited from interface org.opennms.core.queue.FifoQueue
add, add, isEmpty, remove, remove, size
 

Method Detail

isOpen

public boolean isOpen()
Returns true if the queue is currently open.

Returns:
True if the queue is open.

isClosed

public boolean isClosed()
Returns true if the queue is currently closed.

Returns:
True if the queue is closed.

close

public void close()
           throws FifoQueueException
Closes a currently open queue. When a queue is closed is should still allow elements already in the queue to be removed, but new elements should not be added.

Throws:
FifoQueueException - Thrown if an error occurs closing the queue.

open

public void open()
          throws FifoQueueException
Ensures that the queue is open and new elements can be added to the queue.

Throws:
FifoQueueException - Thrown if an error occurs opening the queue.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.