|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.poller.scheduler.PollerScheduler
This class is responsible for reading the information from the poller.xml and the packages.xml in order to schedule and run the service monitors for all interfaces dictated by the package information for the poller.
Field Summary | |
private static int |
INITIAL_POOL_SIZE
The initial size of the consumer thread pool |
private String |
m_activeService
A list of services this scheduler should look for and schedule |
private List |
m_consumerThreadPool
A list of consumer threads that process the m_inQueue |
private boolean |
m_doneScheduling
A blooean indicating that the scheduler should shutdown |
private PCQueue |
m_inQueue
Queue holding NetworkInterface runnables that have been scheduled |
private List |
m_interfaceErrorList
|
private Map |
m_modelMap
A list of full model information for all packages |
private ModelsParser |
m_modelParser
The parser responsible for getting the model information |
private PCQueue |
m_outQueue
Queue holding NetworkInterfaces that have completeted polling |
private List |
m_packageInterfaces
A list of interface lists that need to be scheduled |
private List |
m_packageList
A list of full package information for all packages belonging with this poller |
private PackageParser |
m_packageParser
The parser responsible for getting the package information |
private DiscPollersParser |
m_pollerParser
The parser responsible for getting the poller information from poller.xml |
private Map |
m_scheduleMaster
A final list of the interfaces to schedule |
private ServiceMonitor |
m_serviceMonitor
|
Constructor Summary | |
PollerScheduler(String anIpAddr,
String aService)
Constructor, intializes the queues and thread pool, parses the poller.xml and package.xml and builds the list of interfaces ready to be scheduled. |
Method Summary | |
private void |
assignModelsToPackages(Map aModelMap,
List aPackageList,
String aServiceName)
|
private Map |
buildServiceMaster(String aService,
List aPackageInterfacesList,
ServiceMonitor aMonitor)
|
private List |
getInterfacesToSchedule(List aPackageList,
String aService)
This method builds the interface ip lists for each service that requires scheduling. |
List |
getPackages()
This method returns the list of package information this poller has |
static void |
main(String[] args)
A main method to allow a scheduler to be invoked from a command line. |
private void |
rescheduleInterface(Map aMaster,
Integer newInterval,
PollerTask aTask)
|
void |
start()
This method builds the NetworkInterface runnables and places them on the m_inQueue. |
void |
updateSchedule(Map aSchedule,
Integer anInterval,
PollerTask aTask)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private DiscPollersParser m_pollerParser
private PackageParser m_packageParser
private ModelsParser m_modelParser
private String m_activeService
private List m_packageList
private Map m_modelMap
private List m_packageInterfaces
private PCQueue m_inQueue
private PCQueue m_outQueue
private List m_consumerThreadPool
private Map m_scheduleMaster
private ServiceMonitor m_serviceMonitor
private boolean m_doneScheduling
private List m_interfaceErrorList
private static final int INITIAL_POOL_SIZE
Constructor Detail |
public PollerScheduler(String anIpAddr, String aService) throws IOException
String
- anIpAddr, the ip address of the pollerList
- aServiceList, the list of services that should be scheduledMethod Detail |
private void assignModelsToPackages(Map aModelMap, List aPackageList, String aServiceName)
private Map buildServiceMaster(String aService, List aPackageInterfacesList, ServiceMonitor aMonitor)
public void updateSchedule(Map aSchedule, Integer anInterval, PollerTask aTask)
public void start()
private void rescheduleInterface(Map aMaster, Integer newInterval, PollerTask aTask)
private List getInterfacesToSchedule(List aPackageList, String aService)
List,
- the list of package namespublic List getPackages()
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |