Class NullJournal

java.lang.Object
bitronix.tm.journal.NullJournal
All Implemented Interfaces:
Journal, Service

public class NullJournal extends Object implements Journal
No-op journal. Do not use for anything else than testing as the transaction manager cannot guarantee data integrity with this journal implementation.
Author:
lorban
  • Constructor Details

    • NullJournal

      public NullJournal()
  • Method Details

    • log

      public void log(int status, Uid gtrid, Set<String> uniqueNames) throws IOException
      Description copied from interface: Journal
      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.
      Specified by:
      log in interface Journal
      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

      public void open() throws IOException
      Description copied from interface: Journal
      Open the journal. Integrity should be checked and an exception should be thrown in case the journal is corrupt.
      Specified by:
      open in interface Journal
      Throws:
      IOException - if an I/O error occurs.
    • close

      public void close() throws IOException
      Description copied from interface: Journal
      Close this journal and release all underlying resources.
      Specified by:
      close in interface Journal
      Throws:
      IOException - if an I/O error occurs.
    • force

      public void force() throws IOException
      Description copied from interface: Journal
      Force journal to synchronize with permanent storage.
      Specified by:
      force in interface Journal
      Throws:
      IOException - if an I/O error occurs.
    • collectDanglingRecords

      public Map<Uid,TransactionLogRecord> collectDanglingRecords() throws IOException
      Description copied from interface: Journal
      Collect all dangling records of the journal, ie: COMMITTING records with no corresponding COMMITTED record.
      Specified by:
      collectDanglingRecords in interface Journal
      Returns:
      a Map using Uid objects GTRID as key and TransactionLogRecord as value
      Throws:
      IOException - if an I/O error occurs.
    • shutdown

      public void shutdown()
      Description copied from interface: Service
      Shutdown the service and free all held resources.
      Specified by:
      shutdown in interface Service
    • toString

      public String toString()
      Overrides:
      toString in class Object