@Test public void testFailedUpdate() throws Exception { MetricObserver fmo = new FailingMetricObserver(); AsyncMetricObserver amo = new AsyncMetricObserver("async", fmo, 50, 250); amo.update(mkList(1)); amo.update(mkList(1)); amo.update(mkList(1)); amo.update(mkList(1)); amo.update(mkList(1)); amo.update(mkList(1)); Thread.sleep(1000); amo.stop(); }
public void stop() { stopUpdateThread = true; processingThread.interrupt(); }
AsyncMetricObserver extends BaseMetricObserver { public void stop() { stopUpdateThread = true; processingThread.interrupt(); } }
AsyncMetricObserver extends BaseMetricObserver { public void stop() { stopUpdateThread = true; processingThread.interrupt(); } AsyncMetricObserver(
      String name,
      MetricObserver observer,
      int queueSize,
      long expireTime);  AsyncMetricObserver(String name, MetricObserver observer);  AsyncMetricObserver(String name, MetricObserver observer, int queueSize); }
AsyncMetricObserver extends BaseMetricObserver { public void stop() { stopUpdateThread = true; processingThread.interrupt(); } AsyncMetricObserver(
      String name,
      MetricObserver observer,
      int queueSize,
      long expireTime);  AsyncMetricObserver(String name, MetricObserver observer);  AsyncMetricObserver(String name, MetricObserver observer, int queueSize); void updateImpl(List<Metric> metrics); void stop(); }
AsyncMetricObserver extends BaseMetricObserver { public void stop() { stopUpdateThread = true; processingThread.interrupt(); } AsyncMetricObserver(
      String name,
      MetricObserver observer,
      int queueSize,
      long expireTime);  AsyncMetricObserver(String name, MetricObserver observer);  AsyncMetricObserver(String name, MetricObserver observer, int queueSize); void updateImpl(List<Metric> metrics); void stop();  }