|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.linkd.AbstractQueryManager
org.opennms.netmgt.linkd.DbEventWriter
public class DbEventWriter
This class is used to store informations owned by SnmpCollection and DiscoveryLink Classes in DB. When saving SNMP Collection it populate Bean LinkableNode with information for DiscoveryLink. It performs data test for DiscoveryLink. Also take correct action on DB tables in case node is deleted service SNMP is discovered, service SNMP is Lost and Regained Also this class holds
| Field Summary |
|---|
| Fields inherited from class org.opennms.netmgt.linkd.AbstractQueryManager |
|---|
m_linkd |
| Fields inherited from interface org.opennms.netmgt.linkd.QueryManager |
|---|
ACTION_DELETE, ACTION_UPTODATE, CDP_ADDRESS_TYPE_IP_ADDRESS, SNMP_DOT1D_FDB_STATUS_INVALID, SNMP_DOT1D_FDB_STATUS_LEARNED, SNMP_DOT1D_FDB_STATUS_MGMT, SNMP_DOT1D_FDB_STATUS_OTHER, SNMP_DOT1D_FDB_STATUS_SELF |
| Constructor Summary | |
|---|---|
DbEventWriter()
Constructor for DbEventWriter. |
|
| Method Summary | |
|---|---|
AtInterfaceDao |
getAtInterfaceDao()
|
protected int |
getIfIndexByName(Connection dbConn,
int nodeid,
String ifName)
|
IpInterfaceDao |
getIpInterfaceDao()
|
NodeDao |
getNodeDao()
|
protected RouterInterface |
getNodeFromIp(Connection dbConn,
InetAddress ipaddr)
|
protected int |
getNodeidFromIp(Connection dbConn,
InetAddress ipaddr)
|
protected RouterInterface |
getNodeidMaskFromIp(Connection dbConn,
InetAddress ipaddr)
|
protected List<String> |
getPhysAddrs(int nodeId,
DBUtils d,
Connection dbConn)
|
protected int |
getSnmpIfType(Connection dbConn,
int nodeid,
Integer ifindex)
|
LinkableNode |
getSnmpNode(int nodeid)
getSnmpNode |
List<LinkableNode> |
getSnmpNodeList()
getSnmpNodeList |
protected void |
markOldDataInactive(Connection dbConn,
Timestamp now,
int nodeid)
|
protected void |
saveIpRouteInterface(Connection dbConn,
OnmsIpRouteInterface ipRouteInterface)
|
protected void |
saveStpInterface(Connection dbConn,
OnmsStpInterface stpInterface)
|
protected void |
saveStpNode(Connection dbConn,
OnmsStpNode stpNode)
|
protected void |
saveVlan(Connection dbConn,
OnmsVlan vlan)
|
void |
setAtInterfaceDao(AtInterfaceDao dao)
|
void |
setIpInterfaceDao(IpInterfaceDao dao)
|
void |
setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
|
void |
setNodeDao(NodeDao nodeDao)
|
void |
storeDiscoveryLink(DiscoveryLink discovery)
storeDiscoveryLink |
LinkableNode |
storeSnmpCollection(LinkableNode node,
SnmpCollection snmpcoll)
storeSnmpCollection |
void |
update(int nodeid,
char status)
update |
void |
updateDeletedNodes()
updateDeletedNodes |
void |
updateForInterface(int nodeId,
String ipAddr,
int ifIndex,
char status)
updateForInterface |
| Methods inherited from class org.opennms.netmgt.linkd.AbstractQueryManager |
|---|
getLinkd, getNode, processCdpCacheTable, processDot1DBase, processDot1DBasePortTable, processDot1DTpFdbTable, processDot1StpPortTable, processIpNetToMediaTable, processQBridgeDot1dTpFdbTable, processRouteTable, processStpNode, processVlanTable, sendNewSuspectEvent, setLinkd |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbEventWriter()
Constructor for DbEventWriter.
| Method Detail |
|---|
public void storeDiscoveryLink(DiscoveryLink discovery)
throws SQLException
storeDiscoveryLink
discovery - a DiscoveryLink object.
SQLException - if any.
public LinkableNode storeSnmpCollection(LinkableNode node,
SnmpCollection snmpcoll)
throws SQLException
storeSnmpCollection
node - a LinkableNode object.snmpcoll - a SnmpCollection object.
LinkableNode object.
SQLException - if any.
protected void markOldDataInactive(Connection dbConn,
Timestamp now,
int nodeid)
throws SQLException
markOldDataInactive in class AbstractQueryManagerSQLException
public void update(int nodeid,
char status)
throws SQLException
update
nodeid - a int.status - a char.
SQLException - if any.
protected int getNodeidFromIp(Connection dbConn,
InetAddress ipaddr)
throws SQLException
getNodeidFromIp in class AbstractQueryManagerSQLException
protected RouterInterface getNodeidMaskFromIp(Connection dbConn,
InetAddress ipaddr)
throws SQLException
getNodeidMaskFromIp in class AbstractQueryManagerSQLException
protected RouterInterface getNodeFromIp(Connection dbConn,
InetAddress ipaddr)
throws SQLException
getNodeFromIp in class AbstractQueryManagerSQLException
protected int getSnmpIfType(Connection dbConn,
int nodeid,
Integer ifindex)
throws SQLException
getSnmpIfType in class AbstractQueryManagerSQLException
protected int getIfIndexByName(Connection dbConn,
int nodeid,
String ifName)
throws SQLException
getIfIndexByName in class AbstractQueryManagerSQLException
public LinkableNode getSnmpNode(int nodeid)
throws SQLException
getSnmpNode
nodeid - a int.
LinkableNode object.
SQLException - if any.
public List<LinkableNode> getSnmpNodeList()
throws SQLException
getSnmpNodeList
List object.
SQLException - if any.
public void updateDeletedNodes()
throws SQLException
updateDeletedNodes
SQLException - if any.
public void updateForInterface(int nodeId,
String ipAddr,
int ifIndex,
char status)
throws SQLException
updateForInterface
nodeId - a int.ipAddr - a String object.ifIndex - a int.status - a char.
SQLException - if any.public NodeDao getNodeDao()
getNodeDao in class AbstractQueryManagerpublic void setNodeDao(NodeDao nodeDao)
public IpInterfaceDao getIpInterfaceDao()
getIpInterfaceDao in class AbstractQueryManagerpublic void setIpInterfaceDao(IpInterfaceDao dao)
public AtInterfaceDao getAtInterfaceDao()
getAtInterfaceDao in class AbstractQueryManagerpublic void setAtInterfaceDao(AtInterfaceDao dao)
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
protected void saveIpRouteInterface(Connection dbConn,
OnmsIpRouteInterface ipRouteInterface)
throws SQLException
saveIpRouteInterface in class AbstractQueryManagerSQLException
protected void saveVlan(Connection dbConn,
OnmsVlan vlan)
throws SQLException
saveVlan in class AbstractQueryManagerSQLException
protected void saveStpNode(Connection dbConn,
OnmsStpNode stpNode)
throws SQLException
saveStpNode in class AbstractQueryManagerSQLException
protected void saveStpInterface(Connection dbConn,
OnmsStpInterface stpInterface)
throws SQLException
saveStpInterface in class AbstractQueryManagerSQLException
protected List<String> getPhysAddrs(int nodeId,
DBUtils d,
Connection dbConn)
throws SQLException
getPhysAddrs in class AbstractQueryManagerSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||