Class ControlFile
- java.lang.Object
-
- 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
Constructors Constructor Description ControlFile(java.io.File fileName, int controlDataSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Packet
getControlData()
boolean
load()
void
lock()
Locks the control file.void
store()
void
unlock()
Un locks the control file.
-
-
-
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()
-
-