@Test public void testChangeSilentTime() { Assert.assertFalse(reportDecider.stillSilent()); reportDecider.changeSilentTime(1, TimeUnit.MINUTES); Assert.assertTrue(reportDecider.stillSilent()); }
void changeSilentTime(int wait, TimeUnit timeUnit) { if (wait > 0) { long waitTime = timeUnit.toMillis(wait) + System.currentTimeMillis(); if (waitTime > silentTime) { silentTime = waitTime; } } }
ReportDecider implements HttpRequestProcessor { void changeSilentTime(int wait, TimeUnit timeUnit) { if (wait > 0) { long waitTime = timeUnit.toMillis(wait) + System.currentTimeMillis(); if (waitTime > silentTime) { silentTime = waitTime; } } } }
ReportDecider implements HttpRequestProcessor { void changeSilentTime(int wait, TimeUnit timeUnit) { if (wait > 0) { long waitTime = timeUnit.toMillis(wait) + System.currentTimeMillis(); if (waitTime > silentTime) { silentTime = waitTime; } } } ReportDecider(AddressService addressService, MetricConfig metricConfig); }
ReportDecider implements HttpRequestProcessor { void changeSilentTime(int wait, TimeUnit timeUnit) { if (wait > 0) { long waitTime = timeUnit.toMillis(wait) + System.currentTimeMillis(); if (waitTime > silentTime) { silentTime = waitTime; } } } ReportDecider(AddressService addressService, MetricConfig metricConfig); boolean stillSilent(); synchronized Address getAvailableAddress(); abstract List<LookoutMeasurement> filter(List<LookoutMeasurement> measures); }
ReportDecider implements HttpRequestProcessor { void changeSilentTime(int wait, TimeUnit timeUnit) { if (wait > 0) { long waitTime = timeUnit.toMillis(wait) + System.currentTimeMillis(); if (waitTime > silentTime) { silentTime = waitTime; } } } ReportDecider(AddressService addressService, MetricConfig metricConfig); boolean stillSilent(); synchronized Address getAvailableAddress(); abstract List<LookoutMeasurement> filter(List<LookoutMeasurement> measures);  }