public abstract class AbstractTransactionLog extends Object implements TransactionLog
TransactionLogWriter and TransactionLogReader.
It is important to call close() on this class to ensure that all writes are synced and the log files are closed.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractTransactionLog.Entry
Represents an entry in the transaction log.
|
| Modifier and Type | Field and Description |
|---|---|
protected long |
timestamp |
| Modifier and Type | Method and Description |
|---|---|
void |
append(List<TransactionEdit> edits) |
void |
append(TransactionEdit edit) |
void |
close() |
protected abstract TransactionLogWriter |
createWriter()
Returns a log writer to be used for appending any new
TransactionEdit objects. |
abstract String |
getName() |
abstract TransactionLogReader |
getReader() |
long |
getTimestamp() |
boolean |
isClosed() |
protected abstract TransactionLogWriter createWriter() throws IOException
TransactionEdit objects.IOExceptionpublic abstract String getName()
getName in interface TransactionLogpublic long getTimestamp()
getTimestamp in interface TransactionLogpublic void append(TransactionEdit edit) throws IOException
append in interface TransactionLogIOExceptionpublic void append(List<TransactionEdit> edits) throws IOException
append in interface TransactionLogIOExceptionpublic void close()
throws IOException
close in interface TransactionLogIOExceptionpublic boolean isClosed()
public abstract TransactionLogReader getReader() throws IOException
getReader in interface TransactionLogIOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.