Class ExternalArchiver

  • All Implemented Interfaces:
    net.openhft.chronicle.queue.impl.StoreFileListener, BinLogArchiver

    public class ExternalArchiver
    extends java.lang.Object
    implements BinLogArchiver
    Archives binary log files immediately when they are rolled using a configure archive command. The archive command should be "/path/to/script.sh %path" where %path will be replaced with the file to be archived
    • Field Summary

      • Fields inherited from interface net.openhft.chronicle.queue.impl.StoreFileListener

        NO_OP
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalArchiver​(java.lang.String archiveCommand, java.nio.file.Path path, int maxArchiveRetries)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onReleased​(int cycle, java.io.File file)  
      void stop()
      Stops the archiver thread and tries to archive all existing files this handles the case where a user explicitly disables full/audit log and would expect all log files to be archived rolled or not
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface net.openhft.chronicle.queue.impl.StoreFileListener

        isActive, onAcquired
    • Constructor Detail

      • ExternalArchiver

        public ExternalArchiver​(java.lang.String archiveCommand,
                                java.nio.file.Path path,
                                int maxArchiveRetries)
    • Method Detail

      • onReleased

        public void onReleased​(int cycle,
                               java.io.File file)
        Specified by:
        onReleased in interface BinLogArchiver
        Specified by:
        onReleased in interface net.openhft.chronicle.queue.impl.StoreFileListener
      • stop

        public void stop()
        Stops the archiver thread and tries to archive all existing files this handles the case where a user explicitly disables full/audit log and would expect all log files to be archived rolled or not
        Specified by:
        stop in interface BinLogArchiver