@Test public void slowResponse() throws Exception { repeatTest(10, new Callable<Object>() { @Override public Object call() throws Exception { log = new DesiredRateEventLog(100); SourceDesiredRateDecoupler decoupler = new PassiveScanDecoupler(PVManager.getReadScannerExecutorService(), TimeDuration.ofHertz(50), log); log.setDecoupler(decoupler); decoupler.start(); Thread.sleep(125); decoupler.newValueEvent(); Thread.sleep(25); decoupler.newValueEvent(); Thread.sleep(25); decoupler.newValueEvent(); Thread.sleep(500); decoupler.stop(); assertThat(log.getEvents().size(), equalTo(3)); return null; } }); }
@Override void newValueEvent() { newEvent(DesiredRateEvent.Type.VALUE); }
PassiveScanDecoupler extends SourceDesiredRateDecoupler { @Override void newValueEvent() { newEvent(DesiredRateEvent.Type.VALUE); } }
PassiveScanDecoupler extends SourceDesiredRateDecoupler { @Override void newValueEvent() { newEvent(DesiredRateEvent.Type.VALUE); } PassiveScanDecoupler(ScheduledExecutorService scannerExecutor,
            Duration maxDuration, DesiredRateEventListener listener); }
PassiveScanDecoupler extends SourceDesiredRateDecoupler { @Override void newValueEvent() { newEvent(DesiredRateEvent.Type.VALUE); } PassiveScanDecoupler(ScheduledExecutorService scannerExecutor,
            Duration maxDuration, DesiredRateEventListener listener);  }
PassiveScanDecoupler extends SourceDesiredRateDecoupler { @Override void newValueEvent() { newEvent(DesiredRateEvent.Type.VALUE); } PassiveScanDecoupler(ScheduledExecutorService scannerExecutor,
            Duration maxDuration, DesiredRateEventListener listener);   }