|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.discovery.IPGenerator
| Nested Class Summary | |
(package private) static class |
IPGenerator.IteratorChain
This class is used to chain a set of common iterators together so that when on iterator is exhausted the next one is polled. |
| Field Summary | |
private long |
m_createTime
The system time when this instance was created. |
private java.util.List |
m_includeRanges
The range of items to be enumerated through |
private long |
m_initialWait
The initial wait time. |
private boolean |
m_isInitial
Set true until the initial wait time is over. |
private boolean |
m_isRestarted
Set to true if the end of the iterators has been reached and restarted. |
private java.util.Iterator |
m_iter
The iterator used to cycle through the ranges. |
private long |
m_restartTime
The time the end of the iteration was reached in system milliseconds. |
private long |
m_restartWait
The time to wait between restarts. |
private java.util.List |
m_specificAddresses
The specific list items to be iterated through |
| Constructor Summary | |
(package private) |
IPGenerator(java.util.List specifics,
java.util.List ranges,
long initialWait,
long restartWait)
Constructs a new instance of the class that can be used to iterate over the list of encapsulated objects. |
| Method Summary | |
void |
add(java.lang.Object element)
This method is used to add an element to the queue. |
boolean |
add(java.lang.Object element,
long timeout)
This method is used to add an element to the queue. |
private boolean |
doWait(long maxWait)
This method is used to block a thread the generator is in a timed wait. |
boolean |
isEmpty()
Returns true if the generator is empty. |
(package private) java.util.Iterator |
iterator()
Returns an iterator that may be used to step through all the encapsualted pollable
addresses in the generator. |
java.lang.Object |
remove()
Returns the next element in the internal interator. |
java.lang.Object |
remove(long timeout)
Returns the next element in the internal interator. |
int |
size()
Returns the current size of the queue. |
private void |
sync()
Synchronizes the Discovered IP Manager with the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.List m_specificAddresses
private java.util.List m_includeRanges
private java.util.Iterator m_iter
private boolean m_isInitial
private long m_createTime
private boolean m_isRestarted
private long m_restartTime
private long m_initialWait
private long m_restartWait
| Constructor Detail |
IPGenerator(java.util.List specifics,
java.util.List ranges,
long initialWait,
long restartWait)
specifics - The list of specific nodes.ranges - The range list for address generationinitialWait - The initial wait time in milliseconds.restartWait - The cycle wait time in milliseconds.| Method Detail |
private void sync()
private boolean doWait(long maxWait)
throws java.lang.InterruptedException
maxWait - The maximum time to wait, or zero for indefinite.
java.lang.InterruptedExceptionjava.util.Iterator iterator()
pollable
addresses in the generator. Each call to the
next method on the returned iterator returns
an instance of a pollable address.
public void add(java.lang.Object element)
throws java.lang.InterruptedException,
FifoQueueException
UnsupportedOperationException
is always generated.
add in interface FifoQueueelement - The element to add.
java.lang.UnsupportedOperationException - Always thrown.
FifoQueueException - Thrown if
a queue error occurs.
java.lang.InterruptedException - Thrown if the thread
is interrupted.
public boolean add(java.lang.Object element,
long timeout)
throws java.lang.InterruptedException,
FifoQueueException
UnsupportedOperationException
is always generated.
add in interface FifoQueueelement - The element to add.timeout - The maximum time spent trying to add.
java.lang.UnsupportedOperationException - Always thrown.
java.lang.InterruptedException - Thrown if the thread
is interrupted.
FifoQueueException - Thrown if
a queue error occurs.
public java.lang.Object remove()
throws java.lang.InterruptedException,
FifoQueueException
remove in interface FifoQueuejava.lang.InterruptedException - Thrown if the thread
is interrupted.
FifoQueueException - Thrown if
a queue error occurs.
public java.lang.Object remove(long timeout)
throws java.lang.InterruptedException,
FifoQueueException
remove in interface FifoQueuetimeout - The maximum time to wait (ignored).
FifoQueueException - Thrown if
a queue error occurs.
java.lang.InterruptedException - Thrown if the thread
is interrupted.public int size()
size in interface FifoQueuepublic boolean isEmpty()
isEmpty in interface FifoQueue
|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||