@Test public void testFlushAdapteeWithEmptyQueue() throws Exception { PowerMock.resetAll(); this.logger.fine("Retrieve first flusher: null"); PowerMock.replayAll(); this.wa.flushAdaptee(); PowerMock.verifyAll(); }
public synchronized void flushAdaptee() throws IOException { OdsAsyncFlusher flusher = this.flushers.poll(); this.logger.fine("Retrieve first flusher: " + flusher); if (flusher == null) { this.notifyAll(); return; } while (flusher != null) { this.adaptee.update(flusher); if (flusher.isEnd()) { this.stopped = true; this.notifyAll(); return; } flusher = this.flushers.poll(); this.logger.fine("Retrieve next flusher: " + flusher); } this.notifyAll(); }
OdsFileWriterAdapter implements NamedOdsFileWriter { public synchronized void flushAdaptee() throws IOException { OdsAsyncFlusher flusher = this.flushers.poll(); this.logger.fine("Retrieve first flusher: " + flusher); if (flusher == null) { this.notifyAll(); return; } while (flusher != null) { this.adaptee.update(flusher); if (flusher.isEnd()) { this.stopped = true; this.notifyAll(); return; } flusher = this.flushers.poll(); this.logger.fine("Retrieve next flusher: " + flusher); } this.notifyAll(); } }
OdsFileWriterAdapter implements NamedOdsFileWriter { public synchronized void flushAdaptee() throws IOException { OdsAsyncFlusher flusher = this.flushers.poll(); this.logger.fine("Retrieve first flusher: " + flusher); if (flusher == null) { this.notifyAll(); return; } while (flusher != null) { this.adaptee.update(flusher); if (flusher.isEnd()) { this.stopped = true; this.notifyAll(); return; } flusher = this.flushers.poll(); this.logger.fine("Retrieve next flusher: " + flusher); } this.notifyAll(); } OdsFileWriterAdapter(final Logger logger, final NamedOdsFileWriter adaptee,
                         final Queue<OdsAsyncFlusher> flushers); }
OdsFileWriterAdapter implements NamedOdsFileWriter { public synchronized void flushAdaptee() throws IOException { OdsAsyncFlusher flusher = this.flushers.poll(); this.logger.fine("Retrieve first flusher: " + flusher); if (flusher == null) { this.notifyAll(); return; } while (flusher != null) { this.adaptee.update(flusher); if (flusher.isEnd()) { this.stopped = true; this.notifyAll(); return; } flusher = this.flushers.poll(); this.logger.fine("Retrieve next flusher: " + flusher); } this.notifyAll(); } OdsFileWriterAdapter(final Logger logger, final NamedOdsFileWriter adaptee,
                         final Queue<OdsAsyncFlusher> flushers); static OdsFileWriterAdapter create(final Logger logger,
                                              final NamedOdsFileWriter adaptee); @Override void close(); @Override NamedOdsDocument document(); @Override synchronized void save(); @Override synchronized void update(final OdsAsyncFlusher flusher); synchronized void flushAdaptee(); synchronized boolean isNotStopped(); synchronized void waitForData(); }
OdsFileWriterAdapter implements NamedOdsFileWriter { public synchronized void flushAdaptee() throws IOException { OdsAsyncFlusher flusher = this.flushers.poll(); this.logger.fine("Retrieve first flusher: " + flusher); if (flusher == null) { this.notifyAll(); return; } while (flusher != null) { this.adaptee.update(flusher); if (flusher.isEnd()) { this.stopped = true; this.notifyAll(); return; } flusher = this.flushers.poll(); this.logger.fine("Retrieve next flusher: " + flusher); } this.notifyAll(); } OdsFileWriterAdapter(final Logger logger, final NamedOdsFileWriter adaptee,
                         final Queue<OdsAsyncFlusher> flushers); static OdsFileWriterAdapter create(final Logger logger,
                                              final NamedOdsFileWriter adaptee); @Override void close(); @Override NamedOdsDocument document(); @Override synchronized void save(); @Override synchronized void update(final OdsAsyncFlusher flusher); synchronized void flushAdaptee(); synchronized boolean isNotStopped(); synchronized void waitForData();  }