public LogEntry getLogEntry(long entryIndex) {
        if (entryIndex < 1) {
            throw new IllegalArgumentException("Illegal index: " + entryIndex + ". Index starts from 1.");
        }
        if (!containsLogEntry(entryIndex)) {
            return null;
        }

        LogEntry logEntry = logs.read(toSequence(entryIndex));
        assert logEntry.index() == entryIndex : "Expected: " + entryIndex + ", Entry: " + logEntry;
        return logEntry;
    }
public LogEntry getLogEntry ( long entryIndex ) { if ( entryIndex < 1 ) { throw new IllegalArgumentException ( "Illegal index: " + entryIndex + ". Index starts from 1." ) ; } if ( ! containsLogEntry ( entryIndex ) ) { return null ; } LogEntry logEntry = logs . read ( toSequence ( entryIndex ) ) ; assert logEntry . index ( ) == entryIndex : "Expected: " + entryIndex + ", Entry: " + logEntry ; return logEntry ; }
Returns the log entry stored at {@code entryIndex}. Entry is retrieved
only from the current log, not from the snapshot entry.
<p>
If no entry available at this index, then {@code null} is returned.
<p>
Important: Log entry indices start from 1, not 0.