org.jboss.messaging.core.journal
Interface Journal

All Superinterfaces:
MessagingComponent
All Known Subinterfaces:
TestableJournal
All Known Implementing Classes:
JournalImpl

public interface Journal
extends MessagingComponent

A Journal

Author:
Tim Fox, Clebert Suconic

Method Summary
 void appendAddRecord(long id, byte recordType, byte[] record, boolean sync)
           
 void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync)
           
 void appendAddRecordTransactional(long txID, long id, byte recordType, byte[] record)
           
 void appendAddRecordTransactional(long txID, long id, byte recordType, EncodingSupport record)
           
 void appendCommitRecord(long txID, boolean sync)
           
 void appendDeleteRecord(long id, boolean sync)
           
 void appendDeleteRecordTransactional(long txID, long id)
           
 void appendDeleteRecordTransactional(long txID, long id, byte[] record)
           
 void appendDeleteRecordTransactional(long txID, long id, EncodingSupport record)
           
 void appendPrepareRecord(long txID, EncodingSupport transactionData, boolean sync)
          If the system crashed after a prepare was called, it should store information that is required to bring the transaction back to a state it could be committed.
 void appendRollbackRecord(long txID, boolean sync)
           
 void appendUpdateRecord(long id, byte recordType, byte[] record, boolean sync)
           
 void appendUpdateRecord(long id, byte recordType, EncodingSupport record, boolean sync)
           
 void appendUpdateRecordTransactional(long txID, long id, byte recordType, byte[] record)
           
 void appendUpdateRecordTransactional(long txID, long id, byte recordType, EncodingSupport record)
           
 void checkAndReclaimFiles()
          This method is called automatically when a new file is opened
 void checkCompact()
          This method check for the need of compacting based on the minCompactPercentage This method is usually called automatically when new files are opened
 void compact()
          Eliminate deleted records of the journal.
 int getAlignment()
           
 JournalFile[] getDataFiles()
           
 long load(java.util.List<RecordInfo> committedRecords, java.util.List<PreparedTransactionInfo> preparedTransactions)
           
 void perfBlast(int pages)
           
 
Methods inherited from interface org.jboss.messaging.core.server.MessagingComponent
isStarted, start, stop
 

Method Detail

appendAddRecord

void appendAddRecord(long id,
                     byte recordType,
                     byte[] record,
                     boolean sync)
                     throws java.lang.Exception
Throws:
java.lang.Exception

appendAddRecord

void appendAddRecord(long id,
                     byte recordType,
                     EncodingSupport record,
                     boolean sync)
                     throws java.lang.Exception
Throws:
java.lang.Exception

appendUpdateRecord

void appendUpdateRecord(long id,
                        byte recordType,
                        byte[] record,
                        boolean sync)
                        throws java.lang.Exception
Throws:
java.lang.Exception

appendUpdateRecord

void appendUpdateRecord(long id,
                        byte recordType,
                        EncodingSupport record,
                        boolean sync)
                        throws java.lang.Exception
Throws:
java.lang.Exception

appendDeleteRecord

void appendDeleteRecord(long id,
                        boolean sync)
                        throws java.lang.Exception
Throws:
java.lang.Exception

appendAddRecordTransactional

void appendAddRecordTransactional(long txID,
                                  long id,
                                  byte recordType,
                                  byte[] record)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

appendAddRecordTransactional

void appendAddRecordTransactional(long txID,
                                  long id,
                                  byte recordType,
                                  EncodingSupport record)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

appendUpdateRecordTransactional

void appendUpdateRecordTransactional(long txID,
                                     long id,
                                     byte recordType,
                                     byte[] record)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

appendUpdateRecordTransactional

void appendUpdateRecordTransactional(long txID,
                                     long id,
                                     byte recordType,
                                     EncodingSupport record)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

appendDeleteRecordTransactional

void appendDeleteRecordTransactional(long txID,
                                     long id,
                                     byte[] record)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

appendDeleteRecordTransactional

void appendDeleteRecordTransactional(long txID,
                                     long id,
                                     EncodingSupport record)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

appendDeleteRecordTransactional

void appendDeleteRecordTransactional(long txID,
                                     long id)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

appendCommitRecord

void appendCommitRecord(long txID,
                        boolean sync)
                        throws java.lang.Exception
Throws:
java.lang.Exception

appendPrepareRecord

void appendPrepareRecord(long txID,
                         EncodingSupport transactionData,
                         boolean sync)
                         throws java.lang.Exception

If the system crashed after a prepare was called, it should store information that is required to bring the transaction back to a state it could be committed.

transactionData allows you to store any other supporting user-data related to the transaction

Parameters:
txID -
transactionData - - extra user data for the prepare
Throws:
java.lang.Exception

appendRollbackRecord

void appendRollbackRecord(long txID,
                          boolean sync)
                          throws java.lang.Exception
Throws:
java.lang.Exception

load

long load(java.util.List<RecordInfo> committedRecords,
          java.util.List<PreparedTransactionInfo> preparedTransactions)
          throws java.lang.Exception
Throws:
java.lang.Exception

getAlignment

int getAlignment()
                 throws java.lang.Exception
Throws:
java.lang.Exception

perfBlast

void perfBlast(int pages)
               throws java.lang.Exception
Throws:
java.lang.Exception

checkAndReclaimFiles

void checkAndReclaimFiles()
                          throws java.lang.Exception
This method is called automatically when a new file is opened

Throws:
java.lang.Exception

checkCompact

void checkCompact()
                  throws java.lang.Exception
This method check for the need of compacting based on the minCompactPercentage This method is usually called automatically when new files are opened

Throws:
java.lang.Exception

compact

void compact()
             throws java.lang.Exception
Eliminate deleted records of the journal.

Throws:
java.lang.Exception

getDataFiles

JournalFile[] getDataFiles()


Copyright © 2006 JBoss Inc. All Rights Reserved.