Class JournalImpl

    • Field Detail

      • UPDATE_FACTOR

        public static final double UPDATE_FACTOR
        this is a factor where when you have more than UPDATE_FACTOR updates for every ADD. When this happens we should issue a compacting event. I don't foresee users needing to configure this value. However if this ever happens we would have a system property aligned for this. With that being said, if you needed this, please raise an issue on why you needed to use this, so we may eventually add it to broker.xml when a real use case would determine the configuration exposed in there. To update this value, define a System Property org.apache.activemq.artemis.core.journal.impl.JournalImpl.UPDATE_FACTOR=YOUR VALUE We only calculate this against replaceable updates, on this case for redelivery counts and rescheduled redelivery in artemis server
      • SIZE_COMPLETE_TRANSACTION_RECORD

        public static final int SIZE_COMPLETE_TRANSACTION_RECORD
        See Also:
        Constant Field Values
      • ioExecutorFactory

        protected org.apache.activemq.artemis.utils.ExecutorFactory ioExecutorFactory
      • fileSize

        protected final int fileSize
      • removeExtraFilesOnLoad

        protected boolean removeExtraFilesOnLoad
    • Constructor Detail

      • JournalImpl

        public JournalImpl​(int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO)
      • JournalImpl

        public JournalImpl​(int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO,
                           int userVersion)
      • JournalImpl

        public JournalImpl​(int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           int journalFileOpenTimeout,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO,
                           int userVersion)
      • JournalImpl

        public JournalImpl​(org.apache.activemq.artemis.utils.ExecutorFactory ioExecutors,
                           int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO,
                           int userVersion)
      • JournalImpl

        public JournalImpl​(org.apache.activemq.artemis.utils.ExecutorFactory ioExecutors,
                           int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           int journalFileOpenTimeout,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO,
                           int userVersion)
      • JournalImpl

        public JournalImpl​(org.apache.activemq.artemis.utils.ExecutorFactory ioExecutors,
                           int fileSize,
                           int minFiles,
                           int poolSize,
                           int compactMinFiles,
                           int compactPercentage,
                           int journalFileOpenTimeout,
                           SequentialFileFactory fileFactory,
                           java.lang.String filePrefix,
                           java.lang.String fileExtension,
                           int maxAIO,
                           int userVersion,
                           IOCriticalErrorListener criticalErrorListener,
                           int maxAtticFiles)
    • Method Detail

      • isHistory

        public boolean isHistory()
        Specified by:
        isHistory in interface Journal
      • setHistoryFolder

        public JournalImpl setHistoryFolder​(java.io.File historyFolder,
                                            long maxBytes,
                                            long period)
                                     throws java.lang.Exception
        Specified by:
        setHistoryFolder in interface Journal
        Throws:
        java.lang.Exception
      • replaceableRecord

        public void replaceableRecord​(byte recordType)
        This will declare a record type as being replaceable on updates. Certain update records only need the last value, and they could be replaceable during compacting.
        Specified by:
        replaceableRecord in interface Journal
      • getCompactPercentage

        public float getCompactPercentage()
      • getCompactMinFiles

        public int getCompactMinFiles()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • orderFiles

        public java.util.List<JournalFile> orderFiles()
                                               throws java.lang.Exception
        this method is used internally only however tools may use it to maintenance. It won't be part of the interface as the tools should be specific to the implementation
        Throws:
        java.lang.Exception
      • readJournalFile

        public static int readJournalFile​(SequentialFileFactory fileFactory,
                                          JournalFile file,
                                          JournalReaderCallback reader,
                                          java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> wholeFileBufferReference)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readJournalFile

        public static int readJournalFile​(SequentialFileFactory fileFactory,
                                          JournalFile file,
                                          JournalReaderCallback reader,
                                          java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> wholeFileBufferReference,
                                          boolean reclaimed)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readJournalFile

        public static int readJournalFile​(SequentialFileFactory fileFactory,
                                          JournalFile file,
                                          JournalReaderCallback reader,
                                          java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> wholeFileBufferReference,
                                          boolean reclaimed,
                                          io.netty.util.collection.ByteObjectHashMap<java.lang.Boolean> replaceableRecords)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readJournalFile

        public static int readJournalFile​(SequentialFileFactory fileFactory,
                                          JournalFile file,
                                          JournalReaderCallback reader)
                                   throws java.lang.Exception
        this method is used internally only however tools may use it to maintenance.
        Throws:
        java.lang.Exception
      • appendAddRecord

        public void appendAddRecord​(long id,
                                    byte recordType,
                                    org.apache.activemq.artemis.core.persistence.Persister persister,
                                    java.lang.Object record,
                                    boolean sync,
                                    IOCompletion callback)
                             throws java.lang.Exception
        Specified by:
        appendAddRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendAddEvent

        public void appendAddEvent​(long id,
                                   byte recordType,
                                   org.apache.activemq.artemis.core.persistence.Persister persister,
                                   java.lang.Object record,
                                   boolean sync,
                                   IOCompletion callback)
                            throws java.lang.Exception
        Description copied from interface: Journal
        An event is data recorded on the journal, but it won't have any weight or deletes. It's always ready to be removed. It is useful on recovery data while in use with backup history journal.
        Specified by:
        appendAddEvent in interface Journal
        Throws:
        java.lang.Exception
      • appendUpdateRecord

        public void appendUpdateRecord​(long id,
                                       byte recordType,
                                       org.apache.activemq.artemis.core.persistence.Persister persister,
                                       java.lang.Object record,
                                       boolean sync,
                                       IOCompletion callback)
                                throws java.lang.Exception
        Specified by:
        appendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • tryAppendUpdateRecord

        public void tryAppendUpdateRecord​(long id,
                                          byte recordType,
                                          org.apache.activemq.artemis.core.persistence.Persister persister,
                                          java.lang.Object record,
                                          boolean sync,
                                          boolean replaceableUpdate,
                                          JournalUpdateCallback updateCallback,
                                          IOCompletion callback)
                                   throws java.lang.Exception
        Specified by:
        tryAppendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendDeleteRecord

        public void appendDeleteRecord​(long id,
                                       boolean sync,
                                       IOCompletion callback)
                                throws java.lang.Exception
        Specified by:
        appendDeleteRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendAddRecordTransactional

        public void appendAddRecordTransactional​(long txID,
                                                 long id,
                                                 byte recordType,
                                                 org.apache.activemq.artemis.core.persistence.Persister persister,
                                                 java.lang.Object record)
                                          throws java.lang.Exception
        Specified by:
        appendAddRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendUpdateRecordTransactional

        public void appendUpdateRecordTransactional​(long txID,
                                                    long id,
                                                    byte recordType,
                                                    org.apache.activemq.artemis.core.persistence.Persister persister,
                                                    java.lang.Object record)
                                             throws java.lang.Exception
        Specified by:
        appendUpdateRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendPrepareRecord

        public void appendPrepareRecord​(long txID,
                                        EncodingSupport transactionData,
                                        boolean sync,
                                        IOCompletion callback)
                                 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

        This method also uses the same logic applied on Journal.appendCommitRecord(long, boolean)

        Specified by:
        appendPrepareRecord in interface Journal
        Parameters:
        txID -
        transactionData - extra user data for the prepare
        Throws:
        java.lang.Exception
      • appendCommitRecord

        public void appendCommitRecord​(long txID,
                                       boolean sync,
                                       IOCompletion callback,
                                       boolean lineUpContext)
                                throws java.lang.Exception
        Regarding the number of operations in a given file see JournalCompleteRecordTX.
        Specified by:
        appendCommitRecord in interface Journal
        lineUpContext - if appendCommitRecord should call a storeLineUp. This is because the caller may have already taken into account
        Throws:
        java.lang.Exception
      • appendRollbackRecord

        public void appendRollbackRecord​(long txID,
                                         boolean sync,
                                         IOCompletion callback)
                                  throws java.lang.Exception
        Specified by:
        appendRollbackRecord in interface Journal
        Throws:
        java.lang.Exception
      • getAlignment

        public int getAlignment()
                         throws java.lang.Exception
        Specified by:
        getAlignment in interface Journal
        Throws:
        java.lang.Exception
      • loadInternalOnly

        public JournalLoadInformation loadInternalOnly()
                                                throws java.lang.Exception
        Description copied from interface: Journal
        Load internal data structures and not expose any data. This is only useful if you're using the journal but not interested on the current data. Useful in situations where the journal is being replicated, copied... etc.
        Specified by:
        loadInternalOnly in interface Journal
        Throws:
        java.lang.Exception
      • loadSyncOnly

        public JournalLoadInformation loadSyncOnly​(Journal.JournalState syncState)
                                            throws java.lang.Exception
        Description copied from interface: Journal
        Load internal data structures, and remain waiting for synchronization to complete.
        Specified by:
        loadSyncOnly in interface Journal
        Parameters:
        syncState - the current state of the journal, this parameter ensures consistency.
        Throws:
        java.lang.Exception
      • scheduleCompactAndBlock

        public void scheduleCompactAndBlock​(int timeout)
                                     throws java.lang.Exception
        Description copied from interface: Journal
        This method will start compact using the compactorExecutor and block up to timeout seconds
        Specified by:
        scheduleCompactAndBlock in interface Journal
        Parameters:
        timeout - the timeout in seconds or block forever if <= 0
        Throws:
        java.lang.Exception
      • compact

        public void compact()
        Note: This method can't be called from the main executor, as it will invoke other methods depending on it. Note: only synchronized methods on journal are methods responsible for the life-cycle such as stop, start records will still come as this is being executed
      • load

        public JournalLoadInformation load​(LoaderCallback loadManager)
                                    throws java.lang.Exception

        Load data accordingly to the record layouts

        Basic record layout:

        Field NameSize
        RecordTypeByte (1)
        FileIDInteger (4 bytes)
        Compactor Counter1 byte
        TransactionID (if record is transactional)Long (8 bytes)
        RecordIDLong (8 bytes)
        BodySize(Add, update and delete)Integer (4 bytes)
        UserDefinedRecordType (If add/update only)Byte (1)
        RecordBodyByte Array (size=BodySize)
        Check SizeInteger (4 bytes)

        The check-size is used to validate if the record is valid and complete

        Commit/Prepare record layout:

        Field NameSize
        RecordTypeByte (1)
        FileIDInteger (4 bytes)
        Compactor Counter1 byte
        TransactionID (if record is transactional)Long (8 bytes)
        ExtraDataLength (Prepares only)Integer (4 bytes)
        Number Of Files (N)Integer (4 bytes)
        ExtraDataBytesBytes (sized by ExtraDataLength)
        * FileID(n)Integer (4 bytes)
        * NumberOfElements(n)Integer (4 bytes)
        CheckSizeInteger (4 bytes)

        * FileID and NumberOfElements are the transaction summary, and they will be repeated (N)umberOfFiles times

        Specified by:
        load in interface Journal
        Throws:
        java.lang.Exception
      • processBackupCleanup

        public void processBackupCleanup()
        Description copied from interface: Journal
        It will check max files and max days on files and remove extra files.
        Specified by:
        processBackupCleanup in interface Journal
      • processBackup

        public void processBackup()
        With the exception of initialization, this has to be always called within the compactorExecutor
        Specified by:
        processBackup in interface Journal
      • getHistoryFileName

        public java.lang.String getHistoryFileName​(long sequence,
                                                   java.util.Calendar calendar)
      • removeBackupExtension

        public java.lang.String removeBackupExtension​(java.lang.String name)
      • getDatePortionMillis

        public long getDatePortionMillis​(java.lang.String name)
      • getDatePortion

        public java.lang.String getDatePortion​(java.lang.String name)
      • checkReclaimStatus

        public final boolean checkReclaimStatus()
                                         throws java.lang.Exception
        Description copied from interface: TestableJournal
        This method is called automatically when a new file is opened.

        It will among other things, remove stale files and make them available for reuse.

        This method locks the journal.

        Specified by:
        checkReclaimStatus in interface TestableJournal
        Returns:
        true if cleanup was called
        Throws:
        java.lang.Exception
      • debug

        public java.lang.String debug()
                               throws java.lang.Exception
        Specified by:
        debug in interface TestableJournal
        Throws:
        java.lang.Exception
      • debugWait

        public void debugWait()
                       throws java.lang.InterruptedException
        Method for use on testcases. It will call waitComplete on every transaction, so any assertions on the file system will be correct after this
        Specified by:
        debugWait in interface TestableJournal
        Throws:
        java.lang.InterruptedException
      • flush

        public void flush()
                   throws java.lang.Exception
        Description copied from interface: Journal
        It will make sure there are no more pending operations on the Executors.
        Specified by:
        flush in interface Journal
        Throws:
        java.lang.Exception
      • getMaxRecordSize

        public long getMaxRecordSize()
        The max size record that can be stored in the journal
        Specified by:
        getMaxRecordSize in interface Journal
        Returns:
      • flushAppendExecutor

        public boolean flushAppendExecutor​(long timeout,
                                           java.util.concurrent.TimeUnit unit)
                                    throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • forceBackup

        public void forceBackup​(int timeout,
                                java.util.concurrent.TimeUnit unit)
                         throws java.lang.Exception
        Specified by:
        forceBackup in interface Journal
        Throws:
        java.lang.Exception
      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      • start

        public void start()
        Specified by:
        start in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
      • stop

        public void stop()
                  throws java.lang.Exception
        Specified by:
        stop in interface org.apache.activemq.artemis.core.server.ActiveMQComponent
        Throws:
        java.lang.Exception
      • createControlFile

        protected SequentialFile createControlFile​(java.util.List<JournalFile> files,
                                                   java.util.List<JournalFile> newFiles,
                                                   org.apache.activemq.artemis.api.core.Pair<java.lang.String,​java.lang.String> cleanupRename)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeControlFile

        protected SequentialFile writeControlFile​(SequentialFileFactory fileFactory,
                                                  java.util.List<JournalFile> files,
                                                  java.util.List<JournalFile> newFiles,
                                                  java.util.List<org.apache.activemq.artemis.api.core.Pair<java.lang.String,​java.lang.String>> renames)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteControlFile

        protected void deleteControlFile​(SequentialFile controlFile)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • renameFiles

        protected void renameFiles​(java.util.List<JournalFile> oldFiles,
                                   java.util.List<JournalFile> newFiles)
                            throws java.lang.Exception
        being protected as testcases can override this method
        Throws:
        java.lang.Exception
      • renameExtensionFile

        protected static java.lang.String renameExtensionFile​(java.lang.String name,
                                                              java.lang.String extension)
        Parameters:
        name -
        Returns:
      • onCompactStart

        protected void onCompactStart()
                               throws java.lang.Exception
        This is an interception point for testcases, when the compacted files are written, before replacing the data structures
        Throws:
        java.lang.Exception
      • onCompactLockingTheJournal

        protected void onCompactLockingTheJournal()
                                           throws java.lang.Exception
        This is an interception point for testcases, when the compacted files are written, to be called as soon as the compactor gets a writeLock
        Throws:
        java.lang.Exception
      • onCompactDone

        protected void onCompactDone()
        This is an interception point for testcases, when the compacted files are written, before replacing the data structures
      • readFileHeader

        public JournalFileImpl readFileHeader​(SequentialFile file)
                                       throws java.lang.Exception
        Parameters:
        file -
        Returns:
        Throws:
        java.lang.Exception
      • initFileHeader

        public static int initFileHeader​(SequentialFileFactory fileFactory,
                                         SequentialFile sequentialFile,
                                         int userVersion,
                                         long fileID)
                                  throws java.lang.Exception
        Parameters:
        fileID -
        sequentialFile -
        Throws:
        java.lang.Exception
      • writeHeader

        public static void writeHeader​(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer,
                                       int userVersion,
                                       long fileID)
        Parameters:
        buffer -
        userVersion -
        fileID -
      • synchronizationLock

        public final void synchronizationLock()
        Description copied from interface: Journal
        Write lock the Journal and write lock the compacting process. Necessary only during replication for backup synchronization.
        Specified by:
        synchronizationLock in interface Journal
      • createFilesForBackupSync

        public java.util.Map<java.lang.Long,​JournalFile> createFilesForBackupSync​(long[] fileIds)
                                                                                 throws java.lang.Exception
        Returns Map with a JournalFile for all existing files. These are the files needed to be sent to a backup in order to synchronize it.
        Specified by:
        createFilesForBackupSync in interface Journal
        Parameters:
        fileIds -
        Returns:
        map with the IDs and corresponding JournalFiles
        Throws:
        java.lang.Exception
      • setUpCurrentFile

        protected JournalFile setUpCurrentFile​(int lastDataPos)
                                        throws java.lang.Exception
        Parameters:
        lastDataPos -
        Returns:
        Throws:
        java.lang.Exception
      • switchFileIfNecessary

        protected JournalFile switchFileIfNecessary​(int size)
                                             throws java.lang.Exception
        Parameters:
        size -
        Returns:
        Throws:
        java.lang.Exception
      • moveNextFile

        protected void moveNextFile​(boolean scheduleReclaim,
                                    boolean blockOnClose)
                             throws java.lang.Exception
        You need to guarantee lock.acquire() before calling this method!
        Throws:
        java.lang.Exception
      • replicationSyncPreserveOldFiles

        public void replicationSyncPreserveOldFiles()
        Description copied from interface: Journal
        Stops any operation that may delete or modify old (stale) data.

        Meant to be used during synchronization of data between a live server and its replicating (remote) backup. Old files must not be compacted or deleted during synchronization.

        Specified by:
        replicationSyncPreserveOldFiles in interface Journal
      • replicationSyncFinished

        public void replicationSyncFinished()
        Description copied from interface: Journal
        Restarts file reclaim and compacting on the journal.

        Meant to be used to revert the effect of Journal.replicationSyncPreserveOldFiles(). it should only be called once the synchronization of the backup and live servers is completed.

        Specified by:
        replicationSyncFinished in interface Journal
      • getCompactCount

        public int getCompactCount()
        For tests only
      • appendAddRecord

        public void appendAddRecord​(long id,
                                    byte recordType,
                                    byte[] record,
                                    boolean sync)
                             throws java.lang.Exception
        Specified by:
        appendAddRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendAddRecord

        public void appendAddRecord​(long id,
                                    byte recordType,
                                    org.apache.activemq.artemis.core.persistence.Persister persister,
                                    java.lang.Object record,
                                    boolean sync)
                             throws java.lang.Exception
        Specified by:
        appendAddRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendCommitRecord

        public void appendCommitRecord​(long txID,
                                       boolean sync)
                                throws java.lang.Exception
        Specified by:
        appendCommitRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendCommitRecord

        public void appendCommitRecord​(long txID,
                                       boolean sync,
                                       IOCompletion callback)
                                throws java.lang.Exception
        Specified by:
        appendCommitRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendUpdateRecord

        public void appendUpdateRecord​(long id,
                                       byte recordType,
                                       byte[] record,
                                       boolean sync)
                                throws java.lang.Exception
        Specified by:
        appendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • tryAppendUpdateRecord

        public void tryAppendUpdateRecord​(long id,
                                          byte recordType,
                                          byte[] record,
                                          JournalUpdateCallback updateCallback,
                                          boolean sync,
                                          boolean replaceableRecord)
                                   throws java.lang.Exception
        Specified by:
        tryAppendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendUpdateRecordTransactional

        public void appendUpdateRecordTransactional​(long txID,
                                                    long id,
                                                    byte recordType,
                                                    byte[] record)
                                             throws java.lang.Exception
        Specified by:
        appendUpdateRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendAddRecordTransactional

        public void appendAddRecordTransactional​(long txID,
                                                 long id,
                                                 byte recordType,
                                                 byte[] record)
                                          throws java.lang.Exception
        Specified by:
        appendAddRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendDeleteRecordTransactional

        public void appendDeleteRecordTransactional​(long txID,
                                                    long id)
                                             throws java.lang.Exception
        Specified by:
        appendDeleteRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendPrepareRecord

        public void appendPrepareRecord​(long txID,
                                        byte[] transactionData,
                                        boolean sync)
                                 throws java.lang.Exception
        Specified by:
        appendPrepareRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendPrepareRecord

        public void appendPrepareRecord​(long txID,
                                        EncodingSupport transactionData,
                                        boolean sync)
                                 throws java.lang.Exception
        Description copied from interface: Journal

        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

        Specified by:
        appendPrepareRecord in interface Journal
        transactionData - - extra user data for the prepare
        Throws:
        java.lang.Exception
      • appendDeleteRecordTransactional

        public void appendDeleteRecordTransactional​(long txID,
                                                    long id,
                                                    byte[] record)
                                             throws java.lang.Exception
        Specified by:
        appendDeleteRecordTransactional in interface Journal
        Throws:
        java.lang.Exception
      • appendUpdateRecord

        public void appendUpdateRecord​(long id,
                                       byte recordType,
                                       org.apache.activemq.artemis.core.persistence.Persister persister,
                                       java.lang.Object record,
                                       boolean sync)
                                throws java.lang.Exception
        Specified by:
        appendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • tryAppendUpdateRecord

        public void tryAppendUpdateRecord​(long id,
                                          byte recordType,
                                          org.apache.activemq.artemis.core.persistence.Persister persister,
                                          java.lang.Object record,
                                          JournalUpdateCallback updateCallback,
                                          boolean sync,
                                          boolean replaceableUpdate)
                                   throws java.lang.Exception
        Specified by:
        tryAppendUpdateRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendRollbackRecord

        public void appendRollbackRecord​(long txID,
                                         boolean sync)
                                  throws java.lang.Exception
        Specified by:
        appendRollbackRecord in interface Journal
        Throws:
        java.lang.Exception
      • appendDeleteRecord

        public void appendDeleteRecord​(long id,
                                       boolean sync)
                                throws java.lang.Exception
        Specified by:
        appendDeleteRecord in interface Journal
        Throws:
        java.lang.Exception
      • getSyncCallback

        protected SyncIOCompletion getSyncCallback​(boolean sync)