1, /* default */
1, /* min */
10); /* max */
setSampleSize(sampleSize);
MeasurableMonitor defaultMonitor;
if(monitorJVM) {
ProcessCPUHandler cpuHandler = new ProcessCPUHandler();
cpuHandler.setMXBean(ManagementFactory.getOperatingSystemMXBean());
cpuHandler.setStartTime(ManagementFactory.getRuntimeMXBean().getStartTime());
defaultMonitor = cpuHandler;
} else {
SystemCPUHandler cpuHandler = new SystemCPUHandler();
cpuHandler.setID(id);
cpuHandler.setThresholdValues(tVals);
defaultMonitor = cpuHandler;
}
MeasurableMonitor monitor =
(MeasurableMonitor)config.getEntry(configComponent,
"cpuMonitor",
MeasurableMonitor.class,
defaultMonitor);
long reportRate = Config.getLongEntry(config,