| | |
| | | { |
| | | writer = null; |
| | | } |
| | | readerPool = new LogReaderPool<K, V>(logfile, parser); |
| | | readerPool = new LogReaderPool<>(logfile, parser); |
| | | } |
| | | |
| | | /** |
| | |
| | | static <K extends Comparable<K>, V> LogFile<K, V> newReadOnlyLogFile(final File logFilePath, |
| | | final RecordParser<K, V> parser) throws ChangelogException |
| | | { |
| | | return new LogFile<K, V>(logFilePath, parser, false); |
| | | return new LogFile<>(logFilePath, parser, false); |
| | | } |
| | | |
| | | /** |
| | |
| | | static <K extends Comparable<K>, V> LogFile<K, V> newAppendableLogFile(final File logFilePath, |
| | | final RecordParser<K, V> parser) throws ChangelogException |
| | | { |
| | | return new LogFile<K, V>(logFilePath, parser, true); |
| | | return new LogFile<>(logFilePath, parser, true); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | LogFileCursor<K, V> getCursor() throws ChangelogException |
| | | { |
| | | return new LogFileCursor<K, V>(this); |
| | | return new LogFileCursor<>(this); |
| | | } |
| | | |
| | | /** |
| | | * Returns a cursor initialised to the provided record and position in file. |
| | | * Returns a cursor initialized to the provided record and position in file. |
| | | * |
| | | * @param record |
| | | * The initial record this cursor points on |
| | |
| | | */ |
| | | LogFileCursor<K, V> getCursorInitialisedTo(Record<K,V> record, long position) throws ChangelogException |
| | | { |
| | | return new LogFileCursor<K, V>(this, record, position); |
| | | return new LogFileCursor<>(this, record, position); |
| | | } |
| | | |
| | | /** |