bitronix.tm.journal
Interface Journal

All Superinterfaces:
Service
All Known Implementing Classes:
DiskJournal, NullJournal

public interface Journal
extends Service

Transaction logs journal implementations must implement this interface to provide functionality required by the transaction manager.

© Bitronix Software

Author:
lorban

Method Summary
 void close()
          Close this journal and release all underlying resources.
 java.util.Map collectDanglingRecords()
          Collect all dangling records of the journal, ie: COMMITTING records with no corresponding COMMITTED record.
 void force()
          Force journal to synchronize with permanent storage.
 void log(int status, Uid gtrid, java.util.Set uniqueNames)
          Log a new transaction status to journal.
 void open()
          Open the journal.
 
Methods inherited from interface bitronix.tm.utils.Service
shutdown
 

Method Detail

log

void log(int status,
         Uid gtrid,
         java.util.Set uniqueNames)
         throws java.io.IOException
Log a new transaction status to journal. Note that the journal will not check the flow of the transactions. If you call this method with erroneous data, it will be added to the journal as-is.

Parameters:
status - transaction status to log.
gtrid - GTRID of the transaction.
uniqueNames - unique names of the RecoverableXAResourceProducers participating in the transaction.
Throws:
java.io.IOException - if an I/O error occurs.

open

void open()
          throws java.io.IOException
Open the journal. Integrity should be checked and an exception should be thrown in case the journal is corrupt.

Throws:
java.io.IOException - if an I/O error occurs.

close

void close()
           throws java.io.IOException
Close this journal and release all underlying resources.

Throws:
java.io.IOException - if an I/O error occurs.

force

void force()
           throws java.io.IOException
Force journal to synchronize with permanent storage.

Throws:
java.io.IOException - if an I/O error occurs.

collectDanglingRecords

java.util.Map collectDanglingRecords()
                                     throws java.io.IOException
Collect all dangling records of the journal, ie: COMMITTING records with no corresponding COMMITTED record.

Returns:
a Map using Uid objects GTRID as key and TransactionLogRecord as value
Throws:
java.io.IOException - if an I/O error occurs.