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

    Modifier and Type
    Method
    Description
    void
    Close this journal and release all underlying resources.
    Collect all dangling records of the journal, ie: COMMITTING records with no corresponding COMMITTED record.
    void
    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 the journal.

    Methods inherited from interface bitronix.tm.utils.Service

    shutdown
  • Method Details

    • 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.