/** {@inheritDoc} */ @Override public LogCursor seekLog(String refName, long updateIndex) throws IOException { initLogIndex(); if (logPosition > 0) { byte[] key = LogEntry.key(refName, updateIndex); byte[] match = refName.getBytes(UTF_8); LogCursorImpl i = new LogCursorImpl(logEnd, match); i.block = seek(LOG_BLOCK_TYPE, key, logIndex, logPosition, logEnd); return i; } return new EmptyLogCursor(); }
/** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { initLogIndex(); if (logPosition > 0) { src.adviseSequentialRead(logPosition, logEnd); LogCursorImpl i = new LogCursorImpl(logEnd, null); i.block = readBlock(logPosition, logEnd); return i; } return new EmptyLogCursor(); }
/** {@inheritDoc} */ @Override public LogCursor seekLog(String refName, long updateIndex) throws IOException { initLogIndex(); if (logPosition > 0) { byte[] key = LogEntry.key(refName, updateIndex); byte[] match = refName.getBytes(UTF_8); LogCursorImpl i = new LogCursorImpl(logEnd, match); i.block = seek(LOG_BLOCK_TYPE, key, logIndex, logPosition, logEnd); return i; } return new EmptyLogCursor(); }
/** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { initLogIndex(); if (logPosition > 0) { src.adviseSequentialRead(logPosition, logEnd); LogCursorImpl i = new LogCursorImpl(logEnd, null); i.block = readBlock(logPosition, logEnd); return i; } return new EmptyLogCursor(); }