@Test public void testDisabled() { doReturn(false).when(mockProperties).get(ENABLED_KEY); wrapper.report(); verify(mockReporter, times(0)).report(); wrapper.report(null, null, null, null, null); verify(mockReporter, times(0)).report( any(SortedMap.class), any(SortedMap.class), any(SortedMap.class), any(SortedMap.class), any(SortedMap.class) ); }
@Override public void report() { safeReport(() -> { scheduledReporter.report(); return null; }); }
ScheduledReporterWrapper extends ScheduledReporter { @Override public void report() { safeReport(() -> { scheduledReporter.report(); return null; }); } }
ScheduledReporterWrapper extends ScheduledReporter { @Override public void report() { safeReport(() -> { scheduledReporter.report(); return null; }); } ScheduledReporterWrapper(ConfigurationProperties configurationProperties, T scheduledReporter, ConfigKey<Boolean> enabledKey); }
ScheduledReporterWrapper extends ScheduledReporter { @Override public void report() { safeReport(() -> { scheduledReporter.report(); return null; }); } ScheduledReporterWrapper(ConfigurationProperties configurationProperties, T scheduledReporter, ConfigKey<Boolean> enabledKey); T getScheduledReporter(); @Override void start(long period, TimeUnit unit); @Override void stop(); @Override void close(); @Override void report(); @Override void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters,
        SortedMap<String, Timer> timers); }
ScheduledReporterWrapper extends ScheduledReporter { @Override public void report() { safeReport(() -> { scheduledReporter.report(); return null; }); } ScheduledReporterWrapper(ConfigurationProperties configurationProperties, T scheduledReporter, ConfigKey<Boolean> enabledKey); T getScheduledReporter(); @Override void start(long period, TimeUnit unit); @Override void stop(); @Override void close(); @Override void report(); @Override void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters, SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters,
        SortedMap<String, Timer> timers);  }