@Test(timeout = 20_000L) public void shouldReadRecordsFromBeforeARestart() { indexExampleMessage(); replayIndex.close(); newReplayIndex(); final int msgCount = query(); verifyMappedFile(SESSION_ID, 1); verifyMessagesRead(1); assertEquals(1, msgCount); }
public void close() { positionWriter.close(); fixSessionIdToIndex.clear(); IoUtil.unmap(positionBuffer.byteBuffer()); }
ReplayIndex implements Index { public void close() { positionWriter.close(); fixSessionIdToIndex.clear(); IoUtil.unmap(positionBuffer.byteBuffer()); } }
ReplayIndex implements Index { public void close() { positionWriter.close(); fixSessionIdToIndex.clear(); IoUtil.unmap(positionBuffer.byteBuffer()); } ReplayIndex(
        final String logFileDir,
        final int requiredStreamId,
        final int indexFileSize,
        final int cacheNumSets,
        final int cacheSetSize,
        final BufferFactory bufferFactory,
        final AtomicBuffer positionBuffer,
        final ErrorHandler errorHandler,
        final RecordingIdLookup recordingIdLookup,
        final Long2LongHashMap connectionIdToILinkUuid); }
ReplayIndex implements Index { public void close() { positionWriter.close(); fixSessionIdToIndex.clear(); IoUtil.unmap(positionBuffer.byteBuffer()); } ReplayIndex(
        final String logFileDir,
        final int requiredStreamId,
        final int indexFileSize,
        final int cacheNumSets,
        final int cacheSetSize,
        final BufferFactory bufferFactory,
        final AtomicBuffer positionBuffer,
        final ErrorHandler errorHandler,
        final RecordingIdLookup recordingIdLookup,
        final Long2LongHashMap connectionIdToILinkUuid); void onCatchup(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final Header header,
        final long recordingId); void onFragment(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final Header header); void onFragment(
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength,
        final Header header,
        final long recordingId); int doWork(); void close(); void readLastPosition(final IndexedPositionConsumer consumer); }
ReplayIndex implements Index { public void close() { positionWriter.close(); fixSessionIdToIndex.clear(); IoUtil.unmap(positionBuffer.byteBuffer()); } ReplayIndex(
        final String logFileDir,
        final int requiredStreamId,
        final int indexFileSize,
        final int cacheNumSets,
        final int cacheSetSize,
        final BufferFactory bufferFactory,
        final AtomicBuffer positionBuffer,
        final ErrorHandler errorHandler,
        final RecordingIdLookup recordingIdLookup,
        final Long2LongHashMap connectionIdToILinkUuid); void onCatchup(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final Header header,
        final long recordingId); void onFragment(
        final DirectBuffer buffer,
        final int offset,
        final int length,
        final Header header); void onFragment(
        final DirectBuffer srcBuffer,
        final int srcOffset,
        final int srcLength,
        final Header header,
        final long recordingId); int doWork(); void close(); void readLastPosition(final IndexedPositionConsumer consumer);  }