ControlFile (ActiveIO 1.0 API)
Keywords: org.activeio.journal.active.ControlFile class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.activeio.journal.active
Class ControlFile

    java.lang.Object
      org.activeio.journal.active.ControlFile

All Implemented Interfaces:
  Disposable

public final class ControlFile
extends java.lang.Object
implements Disposable

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()` This method should not throw any exceptions.
`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

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

  Description copied from interface: `Disposable`
  This method should not throw any exceptions. Cleaning up a Disposable object should be easy of an end user therefore do not make him have to handle an Exception.

  Specified by:
    `dispose` in interface `Disposable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © -2005 The ActiveIO Project. All Rights Reserved.