public class CdcrTransactionLog extends TransactionLog
TransactionLog
to:
incref()
, close()
and reopenOutputStream()
.writeCommit(CommitUpdateCommand)
and getReader(long)
.Modifier and Type | Class and Description |
---|---|
class |
CdcrTransactionLog.CdcrLogReader |
TransactionLog.FSReverseReader, TransactionLog.LogCodec, TransactionLog.LogReader, TransactionLog.ReverseReader, TransactionLog.SortedLogReader
deleteOnClose, END_MESSAGE
Modifier and Type | Method and Description |
---|---|
void |
close() |
TransactionLog.LogReader |
getReader(long startingPos)
Returns a reader that can be used while a log is still in use.
|
void |
incref() |
int |
numRecords()
Returns the number of records in the log (currently includes the header and an optional commit).
|
boolean |
try_incref()
Modified to act like
incref() in order to be compatible with UpdateLog.recoverFromLog() . |
long |
write(AddUpdateCommand cmd,
long prevPointer)
Writes an add update command to the transaction log.
|
long |
writeCommit(CommitUpdateCommand cmd) |
long |
writeDelete(DeleteUpdateCommand cmd) |
long |
writeDeleteByQuery(DeleteUpdateCommand cmd) |
addGlobalStrings, checkWriteHeader, closeOutput, decref, endRecord, endsWithCommit, finish, forceClose, getLogSize, getLogSizeFromStream, getReverseReader, getSortedReader, lookup, position, toString, write, writeData, writeLogHeader
public int numRecords()
numRecords
in class TransactionLog
public long write(AddUpdateCommand cmd, long prevPointer)
TransactionLog
write
in class TransactionLog
cmd
- The add update command to be writtenprevPointer
- The pointer in the transaction log which this update depends
on (applicable for in-place updates)public long writeDelete(DeleteUpdateCommand cmd)
writeDelete
in class TransactionLog
public long writeDeleteByQuery(DeleteUpdateCommand cmd)
writeDeleteByQuery
in class TransactionLog
public long writeCommit(CommitUpdateCommand cmd)
writeCommit
in class TransactionLog
public TransactionLog.LogReader getReader(long startingPos)
getReader
in class TransactionLog
public void incref()
incref
in class TransactionLog
public boolean try_incref()
incref()
in order to be compatible with UpdateLog.recoverFromLog()
.
Otherwise, we would have to duplicate the method UpdateLog.recoverFromLog()
in
CdcrUpdateLog
and change the call
if (!ll.try_incref()) continue;
to incref();
.try_incref
in class TransactionLog
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class TransactionLog
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.