@Test public void returnsAStreamPositionedAtASpecifiedEntry() throws Exception { long entrySeqNum = 12; try (InputStream input = navigator.getStreamAtSeqNum(entrySeqNum)) { assertThat(navigatorsCodec.decode(input).getSeqNum(), is(equalTo(entrySeqNum))); } }
@Override public InputStream getStreamAtSeqNum(long seqNum) throws IOException, LogEntryNotFound { return Channels.newInputStream(getReaderAtSeqNum(seqNum)); }
InMemoryPersistenceNavigator implements PersistenceNavigator { @Override public InputStream getStreamAtSeqNum(long seqNum) throws IOException, LogEntryNotFound { return Channels.newInputStream(getReaderAtSeqNum(seqNum)); } }
InMemoryPersistenceNavigator implements PersistenceNavigator { @Override public InputStream getStreamAtSeqNum(long seqNum) throws IOException, LogEntryNotFound { return Channels.newInputStream(getReaderAtSeqNum(seqNum)); } InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec);  InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec, long offset); }
InMemoryPersistenceNavigator implements PersistenceNavigator { @Override public InputStream getStreamAtSeqNum(long seqNum) throws IOException, LogEntryNotFound { return Channels.newInputStream(getReaderAtSeqNum(seqNum)); } InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec);  InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec, long offset); void setMaxEntrySeek(int numberOfEntries); @Override void notifyLogging(long seqNum, long byteAddress); @Override void addToIndex(long seqNum, long address); @Override void notifyTruncation(long seqNum); @Override long getAddressOfEntry(long seqNum); @Override InputStream getStreamAtSeqNum(long seqNum); @Override InputStream getStreamAtFirstEntry(); @Override InputStream getStreamAtLastEntry(); }
InMemoryPersistenceNavigator implements PersistenceNavigator { @Override public InputStream getStreamAtSeqNum(long seqNum) throws IOException, LogEntryNotFound { return Channels.newInputStream(getReaderAtSeqNum(seqNum)); } InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec);  InMemoryPersistenceNavigator(BytePersistence persistence, SequentialEntryCodec<E> codec, long offset); void setMaxEntrySeek(int numberOfEntries); @Override void notifyLogging(long seqNum, long byteAddress); @Override void addToIndex(long seqNum, long address); @Override void notifyTruncation(long seqNum); @Override long getAddressOfEntry(long seqNum); @Override InputStream getStreamAtSeqNum(long seqNum); @Override InputStream getStreamAtFirstEntry(); @Override InputStream getStreamAtLastEntry();  }