@Test public void testDisabled() { ReportQueue reportQueue = new ReportQueue(new ReportClientConfig().setEnabled(false), clientExecutorService, reportClient); reportQueue.report(100, TESTING_METRIC_DATA); verifyNoMoreInteractions(clientExecutorService); verifyNoMoreInteractions(reportClient); }
@Override public void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData) { if (!enabled) { return; } clientExecutorService.submit(() -> reportClient.report(systemTimeMillis, collectedData)); }
ReportQueue implements ReportSink { @Override public void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData) { if (!enabled) { return; } clientExecutorService.submit(() -> reportClient.report(systemTimeMillis, collectedData)); } }
ReportQueue implements ReportSink { @Override public void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData) { if (!enabled) { return; } clientExecutorService.submit(() -> reportClient.report(systemTimeMillis, collectedData)); } @Inject  ReportQueue(ReportClientConfig reportClientConfig, @ForReportClient ExecutorService clientExecutorService, ReportClient reportClient); }
ReportQueue implements ReportSink { @Override public void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData) { if (!enabled) { return; } clientExecutorService.submit(() -> reportClient.report(systemTimeMillis, collectedData)); } @Inject  ReportQueue(ReportClientConfig reportClientConfig, @ForReportClient ExecutorService clientExecutorService, ReportClient reportClient); @Override void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData); }
ReportQueue implements ReportSink { @Override public void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData) { if (!enabled) { return; } clientExecutorService.submit(() -> reportClient.report(systemTimeMillis, collectedData)); } @Inject  ReportQueue(ReportClientConfig reportClientConfig, @ForReportClient ExecutorService clientExecutorService, ReportClient reportClient); @Override void report(long systemTimeMillis, Table<String, Map<String, String>, Object> collectedData);  }