コード例 #1
0
  @Override
  public void run() {
    StringBuffer sb = new StringBuffer();

    while (node.isActive()) {
      sb.append("\n");
      sb.append("ConnectionManager metrics\n");
      connectionManager.dumpPerformanceMetrics(sb);
      sb.append("OperationService metrics\n");
      operationService.dumpPerformanceMetrics(sb);

      logger.info(sb.toString());

      sb.setLength(0);
      try {
        Thread.sleep(TimeUnit.SECONDS.toMillis(delaySeconds));
      } catch (InterruptedException e) {
        return;
      }
    }
  }
コード例 #2
0
 @Override
 public boolean isActive() {
   return node.isActive();
 }