|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.core.queue.FifoQueueImpl
org.opennms.netmgt.scheduler.Scheduler.PeekableFifoQueue
This queue extends the standard FIFO queue instance so that it is possible to peek at an instance without removing it from the queue.
Field Summary | |
private java.lang.Object |
m_hold
The object hold. |
Fields inherited from class org.opennms.core.queue.FifoQueueImpl |
|
Constructor Summary | |
(package private) |
Scheduler.PeekableFifoQueue()
Default constructor. |
Method Summary | |
java.lang.Object |
peek()
This method allows the caller to peek at the next object that would be returned on a remove call. |
java.lang.Object |
remove()
Removes the next element from the queue and returns it to the caller. |
java.lang.Object |
remove(long timeout)
Removes the next element from the queue and returns it to the caller. |
Methods inherited from class org.opennms.core.queue.FifoQueueImpl |
add, add, isEmpty, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Object m_hold
Constructor Detail |
Scheduler.PeekableFifoQueue()
Method Detail |
public java.lang.Object peek() throws java.lang.InterruptedException, FifoQueueException
remove
call. If the queue is
currently empty then the caller is blocked until an object is put
into the queue.
remove
.
java.lang.InterruptedException
- Thrown if the thread is interrupted.
FifoQueueException
- Thrown if an error occurs removing an item from the
queue.public java.lang.Object remove() throws java.lang.InterruptedException, FifoQueueException
remove
in interface FifoQueue
remove
in class FifoQueueImpl
java.lang.InterruptedException
- Thrown if the thread is interrupted.
FifoQueueException
- Thrown if an error occurs removing an item from the
queue.public java.lang.Object remove(long timeout) throws java.lang.InterruptedException, FifoQueueException
timeout
.
remove
in interface FifoQueue
remove
in class FifoQueueImpl
timeout
- The maximum time to wait.
java.lang.InterruptedException
- Thrown if the thread is interrupted.
FifoQueueException
- Thrown if an error occurs removing an item from the
queue.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |