org.siebengeisslein.core
Class TwoFile

java.lang.Object
  extended by org.siebengeisslein.core.TwoFile
Direct Known Subclasses:
DataStoreState, FreeBlockList, GCState

public abstract class TwoFile
extends java.lang.Object


Field Summary
static int STATE_BECOMING_INVALID
           
static int STATE_INVALID
           
static int STATE_VALID
           
 
Constructor Summary
TwoFile(java.lang.String file1, java.lang.String file2, boolean create)
           
 
Method Summary
 void close()
           
 void commit()
           
static int getState(java.io.RandomAccessFile raf)
           
protected abstract  void init()
           
protected abstract  void read(java.io.RandomAccessFile file)
           
protected abstract  void write(java.io.RandomAccessFile file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_VALID

public static final int STATE_VALID
See Also:
Constant Field Values

STATE_INVALID

public static final int STATE_INVALID
See Also:
Constant Field Values

STATE_BECOMING_INVALID

public static final int STATE_BECOMING_INVALID
See Also:
Constant Field Values
Constructor Detail

TwoFile

public TwoFile(java.lang.String file1,
               java.lang.String file2,
               boolean create)
        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getState

public static int getState(java.io.RandomAccessFile raf)
                    throws java.io.IOException
Throws:
java.io.IOException

init

protected abstract void init()
                      throws java.io.IOException
Throws:
java.io.IOException

read

protected abstract void read(java.io.RandomAccessFile file)
                      throws java.io.IOException
Throws:
java.io.IOException

write

protected abstract void write(java.io.RandomAccessFile file)
                       throws java.io.IOException
Throws:
java.io.IOException