Class JournalTransaction

java.lang.Object
org.apache.activemq.artemis.core.journal.impl.JournalTransaction
All Implemented Interfaces:
IOCallback

public class JournalTransaction extends Object implements IOCallback
  • Constructor Details

  • Method Details

    • replaceRecordProvider

      public void replaceRecordProvider(JournalRecordProvider provider)
    • getId

      public long getId()
    • getCounter

      public int getCounter(JournalFile file)
    • incCounter

      public void incCounter(JournalFile file)
    • getPositiveArray

      public long[] getPositiveArray()
    • setCompacting

      public void setCompacting()
    • merge

      public void merge(JournalTransaction other)
      This is used to merge transactions from compacting
    • clear

      public void clear()
    • fillNumberOfRecords

      public void fillNumberOfRecords(JournalFile currentFile, JournalInternalRecord data)
    • checkErrorCondition

      public void checkErrorCondition() throws Exception
      Throws:
      Exception
    • addPositive

      public void addPositive(JournalFile file, long id, int size, boolean replaceableRecord)
    • addNegative

      public void addNegative(JournalFile file, long id)
    • commit

      public void commit(JournalFile file)
      The caller of this method needs to guarantee appendLock.lock at the journal. (unless this is being called from load what is a single thread process).
    • rollback

      public void rollback(JournalFile file)
      The caller of this method needs to guarantee appendLock.lock before calling this method if being used outside of the lock context. or else potFilesMap could be affected
    • prepare

      public void prepare(JournalFile file)
      The caller of this method needs to guarantee appendLock.lock before calling this method if being used outside of the lock context. or else potFilesMap could be affected
    • forget

      public void forget()
      Used by load, when the transaction was not loaded correctly
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • countUp

      public void countUp()
    • done

      public void done()
      Description copied from interface: IOCallback
      Method for sync notifications. When this callback method is called, there is a guarantee the data is written on the disk.

      Note:Leave this method as soon as possible, or you would be blocking the whole notification thread

      Specified by:
      done in interface IOCallback
    • onError

      public void onError(int errorCode, String errorMessage)
      Description copied from interface: IOCallback
      Method for error notifications. Observation: The whole file will be probably failing if this happens. Like, if you delete the file, you will start to get errors for these operations
      Specified by:
      onError in interface IOCallback
    • getDelegateCompletion

      public IOCallback getDelegateCompletion()
    • setDelegateCompletion

      public void setDelegateCompletion(IOCallback delegateCompletion)
    • getErrorMessage

      public String getErrorMessage()
    • getErrorCode

      public int getErrorCode()