示例#1
0
 private void scheduleSamplers() {
   for (final Sampler sampler : bootstrapper.getSamplers()) {
     final SamplerConfig config = sampler.getConfig();
     logger.info("Scheduling {} at fixed rate of {} seconds", sampler, config.getInterval());
     final SamplerThreadPool threadPool =
         (SamplerThreadPool) bootstrapper.getSharedResource(sampler.getConfig().getPool());
     final SamplerTask task = threadPool.schedule(sampler);
     tasks.put(config.getName(), task);
   }
 }
示例#2
0
 private void createController() {
   try {
     final Runnable controller =
         new DefaultTCPController(bootstrapper, tasks, bootstrapper.getSharedResources());
     controllerThread = new Thread(controller);
   } catch (final IllegalStateException e) {
     logger.error(e.getMessage(), e);
     System.exit(1);
   }
 }