Class ControlFile


  • public final class ControlFile
    extends java.lang.Object
    Control file holds the last known good state of the journal. It stores the state in record that is versioned and repeated twice in the file so that a failure in the middle of the write of the first or second record do not not result in an unknown state.
    Version:
    $Revision: 1.1 $
    • Constructor Summary

      Constructors 
      Constructor Description
      ControlFile​(java.io.File fileName, int controlDataSize)  
    • Constructor Detail

      • ControlFile

        public ControlFile​(java.io.File fileName,
                           int controlDataSize)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • lock

        public void lock()
                  throws java.io.IOException
        Locks the control file.
        Throws:
        java.io.IOException
      • unlock

        public void unlock()
                    throws java.io.IOException
        Un locks the control file.
        Throws:
        java.io.IOException
      • load

        public boolean load()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • store

        public void store()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getControlData

        public Packet getControlData()
      • dispose

        public void dispose()