org.apache.activeio.journal.active
Class ControlFile

java.lang.Object
  extended by org.apache.activeio.journal.active.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
ControlFile(java.io.File fileName, int controlDataSize)
           
 
Method Summary
 void dispose()
           
 Packet getControlData()
           
 boolean load()
           
 void lock()
          Locks the control file.
 void store()
           
 void unlock()
          Un locks the control file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()


Copyright © 2005-2011. All Rights Reserved.