code: @Override
      public void run() {
          while (!Thread.currentThread().isInterrupted()) {
              try {
                  AsyncBatchedMetricQuery query = batchService.executeNextQuery(5000);
                  if (query != null) {
                      LOGGER.info("Finished processing " + query.getExpression() + " of batch " + query.getBatchId());
                  }
                  Thread.sleep(POLL_INTERVAL_MS);
              } catch (InterruptedException ex) {
                  LOGGER.info("Execution was interrupted.");
                  Thread.currentThread().interrupt();
                  break;
              } catch (Throwable ex) {
                  LOGGER.warn("Exception in MetricProcessor: {}", ex.toString());
              }
          }
      }
docs: ~ Methods **************************************************************************************************************************************