public class TransactionLogAppender
extends java.lang.Object
TransactionLogRecord objects to a log file.| Modifier and Type | Field and Description |
|---|---|
static int |
END_RECORD
int-encoded "xntB" ASCII string.
|
| Constructor and Description |
|---|
TransactionLogAppender(java.io.File file,
long maxFileLength)
Create an appender that will write to specified file up to the specified maximum length.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
java.lang.String |
toString() |
boolean |
writeLog(TransactionLogRecord tlog)
Write a
TransactionLogRecord to disk. |
public static final int END_RECORD
public TransactionLogAppender(java.io.File file,
long maxFileLength)
throws java.io.IOException
file - the underlying File used to write to disk.maxFileLength - size of the file on disk that can never be bypassed.java.io.IOException - if an I/O error occurs.public TransactionLogHeader getHeader()
TransactionLogHeader that allows reading and controlling the log file's header.public boolean writeLog(TransactionLogRecord tlog) throws java.io.IOException
TransactionLogRecord to disk.tlog - the record to write to disk.java.io.IOException - if an I/O error occurs.public void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.public TransactionLogCursor getCursor() throws java.io.IOException
java.io.IOException - if an I/O error occurs.public void force()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.public java.lang.String toString()
toString in class java.lang.Objectprotected void doForce()
throws java.io.IOException
java.io.IOExceptionCopyright © 2006-2023 Bitronix Software. All Rights Reserved.