public interface CapsdDbSyncer
CapsdDbSyncer interface.
Modifier and Type | Method and Description |
---|---|
InetAddress |
determinePrimarySnmpInterface(List<InetAddress> addressList,
boolean strict)
determinePrimarySnmpInterface
|
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)
isInterfaceInDB
|
boolean |
isInterfaceInDB(InetAddress ifAddress)
isInterfaceInDB
|
boolean |
isServiceCollectionEnabled(String addrString,
String string) |
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.
|
void syncServices()
List<String> syncServicesTable()
List
object.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'
SQLException
- Thrown if an error occurs while syncing the database.void syncSnmpPrimaryState()
SQLException
- Thrown if an error occurs while syncing the database.boolean isInterfaceInDB(InetAddress ifAddress)
isInterfaceInDB
ifAddress
- a InetAddress
object.boolean isInterfaceInDB(Connection dbConn, InetAddress ifAddress) throws SQLException
isInterfaceInDB
dbConn
- a Connection
object.ifAddress
- a InetAddress
object.SQLException
- if any.Integer getServiceId(String name)
name
- the name of the service to look upString getServiceName(Integer id)
id
- a Integer
object.boolean isServiceCollectionEnabled(String addrString, String string)
addrString
- string
- InetAddress determinePrimarySnmpInterface(List<InetAddress> addressList, boolean strict)
determinePrimarySnmpInterface
addressList
- a List
object.strict
- a boolean.InetAddress
object.Copyright © 2015. All rights reserved.