|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.journal.DiskJournal
public class DiskJournal
Simple implementation of a journal that writes on a two-files disk log.
Files are pre-allocated in size, never grow and when the first one is full, dangling records are copied to the second file and logging starts again on the latter.
This implementation is not highly efficient but quite robust and simple. It is based on one of the implementations proposed by Mike Spille.
Configurable properties are all starting with bitronix.tm.journal.disk
.
Configuration
,
XA Exposed, Part III: The Implementor's NotebookConstructor Summary | |
---|---|
DiskJournal()
Create an uninitialized disk journal. |
Method Summary | |
---|---|
void |
close()
Close the disk journal and the underlying files. |
java.util.Map |
collectDanglingRecords()
Collect all dangling records of the active log file. |
void |
force()
Force active log file to synchronize with the underlying disk device. |
void |
log(int status,
Uid gtrid,
java.util.Set uniqueNames)
Log a new transaction status to journal. |
void |
open()
Open the disk journal. |
void |
shutdown()
Shutdown the service and free all held resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiskJournal()
Method Detail |
---|
public void log(int status, Uid gtrid, java.util.Set uniqueNames) throws java.io.IOException
log
in interface Journal
status
- transaction status to log. See Status
constantsgtrid
- raw GTRID of the transactionuniqueNames
- unique names of the XADataSource
s participating in this transaction
java.io.IOException
public void force() throws java.io.IOException
force
in interface Journal
java.io.IOException
public void open() throws java.io.IOException
open
in interface Journal
java.io.IOException
public void close() throws java.io.IOException
close
in interface Journal
java.io.IOException
public void shutdown()
Service
shutdown
in interface Service
public java.util.Map collectDanglingRecords() throws java.io.IOException
collectDanglingRecords
in interface Journal
TransactionLogRecord
as value
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |