Package edu.berkeley.xtrace.reporting

Examples of edu.berkeley.xtrace.reporting.Reporter


      sourcesExecutor.execute((Runnable) sources[i]);
    }
  }
 
  private static void setupBackplane() {
    final Reporter reporter = Reporter.getReporter();
   
    /* Sync the reporter every n seconds */
    String syncIntervalStr = System.getProperty("xtrace.proxy.syncinterval", "5");
    long syncInterval = Integer.parseInt(syncIntervalStr);
    Timer timer = new Timer();
    timer.schedule(new SyncTimer(reporter), syncInterval*1000, syncInterval*1000);
   
    new Thread(new Runnable() {
      public void run() {
        LOG.info("Proxy waiting for reports");
       
        while (true) {
          String msg = null;
          try {
            msg = incomingReportQueue.take();
          } catch (InterruptedException e) {
            LOG.warn("Interrupted", e);
            continue;
          }
          LOG.debug("Received report of length " + msg.length());
          LOG.debug(msg);
          Report rpt = Report.createFromString(msg);
          reporter.sendReport(rpt);
          LOG.debug("Report sent to backend");
        }
      }
    }).start();
  }
View Full Code Here

TOP

Related Classes of edu.berkeley.xtrace.reporting.Reporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.