Class JournalCompactor

    • Method Detail

      • getNewDataFiles

        public java.util.List<JournalFile> getNewDataFiles()
      • getNewRecords

        public org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap<JournalRecord> getNewRecords()
      • getNewTransactions

        public org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap<JournalTransaction> getNewTransactions()
      • addPendingTransaction

        public void addPendingTransaction​(long transactionID,
                                          long[] ids)
        This methods informs the Compactor about the existence of a pending (non committed) transaction
      • addCommandDelete

        public void addCommandDelete​(long id,
                                     JournalFile usedFile)
        Parameters:
        id -
        usedFile -
      • addCommandUpdate

        public void addCommandUpdate​(long id,
                                     JournalFile usedFile,
                                     int size,
                                     boolean replaceableUpdate)
        Parameters:
        id -
        usedFile -
      • replayPendingCommands

        public void replayPendingCommands()
        Replay pending counts that happened during compacting
      • flushUpdates

        public void flushUpdates()
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • onReadCommitRecord

        public void onReadCommitRecord​(long transactionID,
                                       int numberOfRecords)
                                throws java.lang.Exception
        Specified by:
        onReadCommitRecord in interface JournalReaderCallback
        Throws:
        java.lang.Exception
      • onReadDeleteRecord

        public void onReadDeleteRecord​(long recordID)
                                throws java.lang.Exception
        Specified by:
        onReadDeleteRecord in interface JournalReaderCallback
        Throws:
        java.lang.Exception
      • onReadPrepareRecord

        public void onReadPrepareRecord​(long transactionID,
                                        byte[] extraData,
                                        int numberOfRecords)
                                 throws java.lang.Exception
        Specified by:
        onReadPrepareRecord in interface JournalReaderCallback
        Throws:
        java.lang.Exception
      • onReadRollbackRecord

        public void onReadRollbackRecord​(long transactionID)
                                  throws java.lang.Exception
        Specified by:
        onReadRollbackRecord in interface JournalReaderCallback
        Throws:
        java.lang.Exception
      • replaceableRecord

        public void replaceableRecord​(byte recordType)