|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CapsdDbSyncer
| Method Summary | |
|---|---|
java.lang.Integer |
getServiceId(java.lang.String name)
Returns the service ID from the service table that was loaded during class initialization for the specified name. |
java.lang.String |
getServiceName(java.lang.Integer id)
Returns the service name from the service table that was loaded during class initialization for the specified ID. |
boolean |
isInterfaceInDB(java.sql.Connection dbConn,
java.net.InetAddress ifAddress)
|
void |
syncManagementState(java.sql.Connection conn)
Responsible for syncing up the 'isManaged' field of the ipInterface table and the 'status' field of the ifServices table based on the capsd and poller configurations. |
void |
syncServices(java.sql.Connection conn)
This method is responsible for sync'ing the content of the 'service' table with the protocols listed in the caspd-configuration.xml file. |
java.util.List<java.lang.String> |
syncServicesTable(java.sql.Connection conn)
Synchronize configured services list with the database. |
void |
syncSnmpPrimaryState(java.sql.Connection conn)
Responsible for syncing up the 'isPrimarySnmp' field of the ipInterface table based on the capsd and collectd configurations. |
| Method Detail |
|---|
void syncServices(java.sql.Connection conn)
throws java.sql.SQLException
java.sql.SQLException
java.util.List<java.lang.String> syncServicesTable(java.sql.Connection conn)
throws java.sql.SQLException
java.sql.SQLException
void syncManagementState(java.sql.Connection conn)
throws java.sql.SQLException
Here is how the statuses are set:
If an interface is 'unmanaged' based on the capsd configuration,
ipManaged='U' and status='U'
If an interface is 'managed' based on the capsd configuration,
1. If the interface is not in any pacakge, ipManaged='N' and status ='N'
2. If the interface in atleast one package but the service is not polled by
by any of the packages, ipManaged='M' and status='N'
3. If the interface in atleast one package and the service is polled by a
package that this interface belongs to, ipManaged='M' and status'=A'
conn - Connection to the database.
java.sql.SQLException - Thrown if an error occurs while syncing the database.
void syncSnmpPrimaryState(java.sql.Connection conn)
throws java.sql.SQLException
conn - Connection to the database.
java.sql.SQLException - Thrown if an error occurs while syncing the database.
boolean isInterfaceInDB(java.sql.Connection dbConn,
java.net.InetAddress ifAddress)
throws java.sql.SQLException
java.sql.SQLExceptionjava.lang.Integer getServiceId(java.lang.String name)
name - the name of the service to look up
java.lang.String getServiceName(java.lang.Integer id)
name - the ID of the service to look up
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||