|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.opennms.bb.dp.common.components.PollerThread | +--org.opennms.bb.dp.capsd.components.CapsdReadManager
CapsdReadManager is responsible to query the IPAddresses received from discovery for the SNMP information. It maintains a pool of RunnableConsumerThreads that take input (CapsReader) from the discRecvQ, send out the SNMP query requests and then adds the CapsReader object to the databaseQ.
Field Summary | |
private PCQueue |
m_capsPropReadQ
Input queue to the RunnableConsumerThreads. |
private PCQueue |
m_databaseQ
The backside queue for the RunnableConsumerThread instances. |
private PCQueue |
m_discRecvQ
The queue to which the newly discovered nodes from discovery are received. |
private Set |
m_dupNodes
Set of nodes (ip addresses) already known by Capsd |
private List |
m_plugins
The list containing the service plugin objects. |
private List |
m_threads
The list of RunnableConsumerThreads used to execute the CapsReader objects. |
private static int |
NUM_READERS
The number of RunnableConsumerThreads that should be started by the manager. |
Fields inherited from class org.opennms.bb.dp.common.components.PollerThread |
m_curOpStatus, STATUS_MASK, STATUS_NORMAL, STATUS_PAUSED, STATUS_PAUSING, STATUS_RESUMING, STATUS_SHUTDOWN, STATUS_STARTING, STATUS_TERMINATING |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
private |
CapsdReadManager()
The default constructor for the class. |
|
CapsdReadManager(PCQueue discRecvQ,
PCQueue databaseQ,
List servicePlugins,
Set dupNodes)
Creates a new CapsdReadManager that creates a RunnableConsumerThread thread pool. |
Method Summary | |
void |
run()
The run method is the core of the object in terms of managing the consumer threads and enqueuing objects for the consumers. |
void |
shutdown()
Start the shutdown and notify run() to shutdown |
Methods inherited from class org.opennms.bb.dp.common.components.PollerThread |
getCtrlStatus, getOpStatus, pauseOperation, pauseThread, resumeOperation, resumeThread, setCtrlStatus, setOpStatus, setUserStatus, shutdownThread |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private PCQueue m_discRecvQ
The queue to which the newly discovered nodes from discovery are received.
private PCQueue m_capsPropReadQ
Input queue to the RunnableConsumerThreads. CapsReader objects are added to the queue so when these run they query the nodes for SNMP info and the services status.
private PCQueue m_databaseQ
The backside queue for the RunnableConsumerThread instances. Once the objects are actually executed via their run methods, the completed object is palced into this queue.
private List m_threads
The list of RunnableConsumerThreads used to execute the CapsReader objects.
private static final int NUM_READERS
The number of RunnableConsumerThreads that should be started by the manager.
private List m_plugins
The list containing the service plugin objects.
private Set m_dupNodes
Constructor Detail |
private CapsdReadManager() throws UnsupportedOperationException
The default constructor for the class. The constructor is not supported and will always throw an unsupported operation exception.
UnsupportedOperationException
- Always thrown
by the constructor.public CapsdReadManager(PCQueue discRecvQ, PCQueue databaseQ, List servicePlugins, Set dupNodes)
Creates a new CapsdReadManager that creates a RunnableConsumerThread thread pool. The instance manages the thread pool and the queueus that are the source of information for the runnable consumer classes.
discRecvQ
- The queue to which the newly discovered nodes
from discovery are added.databaseQ
- The queue to which nodes are added after the SNMP
and plugin queries are completed - output Q
to the RunnableConsumerThread(s).servicePlugins
- The list that contains all the service plugins
with each plugin having its capability name
class to handle the plugin etc.dupNodes
- The set that contains all the addresses already known
to Capsd.IllegalArgumentException
- Thrown if either of the passed
queues are null.Method Detail |
public void run()
The run method is the core of the object in terms of managing the consumer threads and enqueuing objects for the consumers. When the run method is first called the consumer threads are started. After the threads are started the method monitors for status changes and transforms discovery messages into CapsReader objects for the runnable consumers.
run
in class Thread
public void shutdown()
shutdown
in class PollerThread
org.opennms.bb.dp.common.components.PollerThread
PollerThread.STATUS_TERMINATING
,
Object.notifyAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |