public class TransactionLog extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
class |
TransactionLog.FSReverseReader |
class |
TransactionLog.LogCodec |
class |
TransactionLog.LogReader |
class |
TransactionLog.ReverseReader |
Modifier and Type | Field and Description |
---|---|
protected boolean |
deleteOnClose |
static String |
END_MESSAGE |
Modifier | Constructor and Description |
---|---|
protected |
TransactionLog() |
Modifier and Type | Method and Description |
---|---|
protected void |
addGlobalStrings(Collection<String> strings) |
void |
close() |
void |
decref() |
protected void |
endRecord(long startRecordPosition) |
boolean |
endsWithCommit() |
void |
finish(UpdateLog.SyncLevel syncLevel) |
void |
forceClose() |
long |
getLogSize() |
TransactionLog.LogReader |
getReader(long startingPos)
Returns a reader that can be used while a log is still in use.
|
TransactionLog.ReverseReader |
getReverseReader()
Returns a single threaded reverse reader
|
void |
incref() |
Object |
lookup(long pos) |
int |
numRecords()
Returns the number of records in the log (currently includes the header and an optional commit).
|
long |
position()
returns the current position in the log file
|
void |
rollback(long pos) |
long |
snapshot()
takes a snapshot of the current position and number of records
for later possible rollback, and returns the position
|
String |
toString() |
boolean |
try_incref() |
long |
write(AddUpdateCommand cmd,
int flags) |
long |
writeCommit(CommitUpdateCommand cmd,
int flags) |
long |
writeData(Object o) |
long |
writeDelete(DeleteUpdateCommand cmd,
int flags) |
long |
writeDeleteByQuery(DeleteUpdateCommand cmd,
int flags) |
protected void |
writeLogHeader(TransactionLog.LogCodec codec) |
public static final String END_MESSAGE
protected volatile boolean deleteOnClose
public int numRecords()
public boolean endsWithCommit() throws IOException
IOException
public long snapshot()
public void rollback(long pos) throws IOException
IOException
public long writeData(Object o)
protected void addGlobalStrings(Collection<String> strings)
protected void writeLogHeader(TransactionLog.LogCodec codec) throws IOException
IOException
protected void endRecord(long startRecordPosition) throws IOException
IOException
public long write(AddUpdateCommand cmd, int flags)
public long writeDelete(DeleteUpdateCommand cmd, int flags)
public long writeDeleteByQuery(DeleteUpdateCommand cmd, int flags)
public long writeCommit(CommitUpdateCommand cmd, int flags)
public Object lookup(long pos)
public void incref()
public boolean try_incref()
public void decref()
public long position()
public void finish(UpdateLog.SyncLevel syncLevel)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void forceClose()
public long getLogSize()
public TransactionLog.LogReader getReader(long startingPos)
public TransactionLog.ReverseReader getReverseReader() throws IOException
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.