|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.journal.TransactionLogAppender
public class TransactionLogAppender
Used to write TransactionLogRecord
objects to a log file.
Field Summary | |
---|---|
static int |
END_RECORD
int-encoded "xntB" ASCII string. |
Constructor Summary | |
---|---|
TransactionLogAppender(File file,
long maxFileLength)
Create an appender that will write to specified file up to the specified maximum length. |
Method Summary | |
---|---|
void |
close()
Close the appender and the underlying file. |
protected void |
doForce()
|
void |
force()
Force flushing the logs to disk |
TransactionLogCursor |
getCursor()
Creates a cursor on this journal file allowing iteration of its records. |
TransactionLogHeader |
getHeader()
Return a TransactionLogHeader that allows reading and controlling the log file's header. |
String |
toString()
|
boolean |
writeLog(TransactionLogRecord tlog)
Write a TransactionLogRecord to disk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int END_RECORD
Constructor Detail |
---|
public TransactionLogAppender(File file, long maxFileLength) throws IOException
file
- the underlying File used to write to disk.maxFileLength
- size of the file on disk that can never be bypassed.
IOException
- if an I/O error occurs.Method Detail |
---|
public TransactionLogHeader getHeader()
TransactionLogHeader
that allows reading and controlling the log file's header.
public boolean writeLog(TransactionLogRecord tlog) throws IOException
TransactionLogRecord
to disk.
tlog
- the record to write to disk.
IOException
- if an I/O error occurs.public void close() throws IOException
IOException
- if an I/O error occurs.public TransactionLogCursor getCursor() throws IOException
IOException
- if an I/O error occurs.public void force() throws IOException
IOException
- if an I/O error occurs.public String toString()
toString
in class Object
protected void doForce() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |