@Test public void testUpdate() { InstantReservoir reservoir = new InstantReservoir(); ActiveReservoirListener listener = new StubReservoirReporter().listener; reservoir.addListener(listener); Record record = new RecordEvent("TEST"); assertTrue(listener.onRecordUpdate(Lists.newArrayList(record))); reservoir.update(record); assertEquals(0, reservoir.size()); reservoir.start(); reservoir.update(record); assertEquals(0, reservoir.size()); reservoir.stop(); assertEquals(0, reservoir.size()); }
public void update(Record record) { if (!isReady) { logger.info("Current reservoir is not ready for update record"); return; } onRecordUpdate(record); }
InstantReservoir extends AbstractActiveReservoir { public void update(Record record) { if (!isReady) { logger.info("Current reservoir is not ready for update record"); return; } onRecordUpdate(record); } }
InstantReservoir extends AbstractActiveReservoir { public void update(Record record) { if (!isReady) { logger.info("Current reservoir is not ready for update record"); return; } onRecordUpdate(record); }  }
InstantReservoir extends AbstractActiveReservoir { public void update(Record record) { if (!isReady) { logger.info("Current reservoir is not ready for update record"); return; } onRecordUpdate(record); }  void update(Record record); int size(); }
InstantReservoir extends AbstractActiveReservoir { public void update(Record record) { if (!isReady) { logger.info("Current reservoir is not ready for update record"); return; } onRecordUpdate(record); }  void update(Record record); int size();  }