@Test public void shouldCloseBeDelegatedToUnderlyingJournal() throws IOException { final Journal mock = Mockito.mock(Journal.class); Mockito.when(mock.redo()).thenReturn(Collections.<Location>emptyList()); final JournalIOStorage storage = new JournalIOStorage(10, mock, JournalIOStorage.DEFAULT_WRITE_CALLBACK); storage.close(); Mockito.verify(mock).close(); }
@Override public void close() throws IOException { this.journal.close(); }
JournalIOStorage extends ByteBufferStorage implements Closeable { @Override public void close() throws IOException { this.journal.close(); } }
JournalIOStorage extends ByteBufferStorage implements Closeable { @Override public void close() throws IOException { this.journal.close(); } JournalIOStorage(final int maximumSize, final Journal journal, final WriteCallback writeCallback); }
JournalIOStorage extends ByteBufferStorage implements Closeable { @Override public void close() throws IOException { this.journal.close(); } JournalIOStorage(final int maximumSize, final Journal journal, final WriteCallback writeCallback); @Override Optional<Long> beginning(); @Override Optional<Long> end(); @Override Iterable<Pair<Long, int[]>> all(); @Override void close(); }
JournalIOStorage extends ByteBufferStorage implements Closeable { @Override public void close() throws IOException { this.journal.close(); } JournalIOStorage(final int maximumSize, final Journal journal, final WriteCallback writeCallback); @Override Optional<Long> beginning(); @Override Optional<Long> end(); @Override Iterable<Pair<Long, int[]>> all(); @Override void close(); static final WriteCallback DEFAULT_WRITE_CALLBACK; }