|
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.netmgt.outage.OutageManager
The OutageManager receives events selectively and maintains a historical archive of each outage for all devices in the database
Field Summary | |
private static java.lang.String |
LOG4J_CATEGORY
The log4j category used to log debug messsages and statements. |
private DbConnectionFactory |
m_dbConnFactory
|
private EventIpcManager |
m_eventMgr
The EventIpcManager to use for sending and receiving events |
private OutageMgrEventProcessor |
m_eventReceiver
The events receiver |
private BasicNetwork |
m_network
The Network where nodes, interfaces and services live |
private OutageManagerConfig |
m_outageMgrConfig
|
private java.util.Map |
m_serviceTableMap
The service table map |
private static OutageManager |
m_singleton
The singleton instance of this class |
private int |
m_status
Current status of this fiber |
private RunnableConsumerThreadPool |
m_writerPool
The RunnableConsumerThreadPool that runs writers that update the database |
private static int |
NUM_THREADS
The number of threads that must be started. |
Fields inherited from interface org.opennms.core.fiber.PausableFiber |
PAUSE_PENDING, PAUSED, RESUME_PENDING |
Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
Constructor Summary | |
OutageManager()
The constructor for the OutageManager |
Method Summary | |
void |
addServiceMapping(java.lang.String svcname,
long serviceid)
Add the svcname/svcid mapping to the servicetable map |
private void |
buildServiceTableMap(java.sql.Connection dbConn)
Build the servicename to serviceid map - this map is used so as to avoid a database lookup for each incoming event |
private void |
closeOutages(java.sql.Connection dbConn)
Close the currently open outages for services and interfaces that are currently unmanaged |
(package private) java.sql.Connection |
getConnection()
|
EventIpcManager |
getEventMgr()
|
java.lang.String |
getGetNextOutageID()
|
static OutageManager |
getInstance()
Return a handle to the OutageManager |
java.lang.String |
getName()
Returns a name/id for this process |
BasicNetwork |
getNetwork()
|
private int |
getNumWriters()
|
OutageManagerConfig |
getOutageMgrConfig()
|
long |
getServiceID(java.lang.String svcname)
Return the service id for the name passed |
int |
getStatus()
Returns the current status |
void |
init()
|
void |
pause()
Pauses all the threads |
void |
resume()
Resumes all the threads |
void |
setDbConnectionFactory(DbConnectionFactory dbConnFactory)
|
void |
setEventMgr(EventIpcManager eventMgr)
|
void |
setOutageMgrConfig(OutageManagerConfig config)
|
void |
start()
Read the configuration xml, create and start all the subthreads. |
void |
stop()
Stops all the threads |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String LOG4J_CATEGORY
private static final OutageManager m_singleton
private static final int NUM_THREADS
private java.util.Map m_serviceTableMap
private BasicNetwork m_network
private OutageMgrEventProcessor m_eventReceiver
private RunnableConsumerThreadPool m_writerPool
private EventIpcManager m_eventMgr
private int m_status
private OutageManagerConfig m_outageMgrConfig
private DbConnectionFactory m_dbConnFactory
Constructor Detail |
public OutageManager()
Method Detail |
private void buildServiceTableMap(java.sql.Connection dbConn) throws java.sql.SQLException
java.sql.SQLException
private void closeOutages(java.sql.Connection dbConn) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getName()
getName
in interface Fiber
Fiber
.public int getStatus()
getStatus
in interface Fiber
Fiber
.public EventIpcManager getEventMgr()
public void setEventMgr(EventIpcManager eventMgr)
public void init()
java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
public void setDbConnectionFactory(DbConnectionFactory dbConnFactory)
public void setOutageMgrConfig(OutageManagerConfig config)
public OutageManagerConfig getOutageMgrConfig()
private int getNumWriters()
public void start()
start
in interface Fiber
public void pause()
pause
in interface PausableFiber
public void resume()
resume
in interface PausableFiber
public void stop()
stop
in interface Fiber
public long getServiceID(java.lang.String svcname)
svcname
- the service name whose service id is required
public void addServiceMapping(java.lang.String svcname, long serviceid)
public static OutageManager getInstance()
public java.lang.String getGetNextOutageID()
public BasicNetwork getNetwork()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |