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.

Author:
lorban

Method Summary
 void close()
          Close this journal and release all underlying resources.
 Map<Uid,TransactionLogRecord> 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, Set<String> 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,
         Set<String> uniqueNames)
         throws 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:
IOException - if an I/O error occurs.

open

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

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

close

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

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

force

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

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

collectDanglingRecords

Map<Uid,TransactionLogRecord> collectDanglingRecords()
                                                     throws 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:
IOException - if an I/O error occurs.


Copyright © 2006-2013 Bitronix Software. All Rights Reserved.