|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CapsdDbSyncer
| Method Summary | |
|---|---|
Integer |
getServiceId(String name)
Returns the service ID from the service table that was loaded during class initialization for the specified name. |
String |
getServiceName(Integer id)
Returns the service name from the service table that was loaded during class initialization for the specified ID. |
boolean |
isInterfaceInDB(Connection dbConn,
InetAddress ifAddress)
|
boolean |
isInterfaceInDB(InetAddress ifAddress)
|
void |
syncManagementState()
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()
This method is responsible for sync'ing the content of the 'service' table with the protocols listed in the caspd-configuration.xml file. |
List<String> |
syncServicesTable()
Synchronize configured services list with the database. |
void |
syncSnmpPrimaryState()
Responsible for syncing up the 'isPrimarySnmp' field of the ipInterface table based on the capsd and collectd configurations. |
| Method Detail |
|---|
void syncServices()
List<String> syncServicesTable()
void syncManagementState()
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.
SQLException - Thrown if an error occurs while syncing the database.void syncSnmpPrimaryState()
conn - Connection to the database.
SQLException - Thrown if an error occurs while syncing the database.boolean isInterfaceInDB(InetAddress ifAddress)
boolean isInterfaceInDB(Connection dbConn,
InetAddress ifAddress)
throws SQLException
SQLExceptionInteger getServiceId(String name)
name - the name of the service to look up
String getServiceName(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 | ||||||||