org.activeio.journal.active
Class LogFile

java.lang.Object
  extended by org.activeio.journal.active.LogFile
All Implemented Interfaces:
Disposable

public final class LogFile
extends Object
implements Disposable

Allows read/append access to a LogFile.

Version:
$Revision: 1.1 $

Constructor Summary
LogFile(File file, int initialSize)
           
 
Method Summary
 void dispose()
          This method should not throw any exceptions.
 void force()
           
 boolean loadAndCheckRecord(int offset, Record record)
           
 void read(int offset, byte[] answer)
           
 void readRecordHeader(int offset, Record record)
           
 void resize()
           
 void write(int offset, ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFile

public LogFile(File file,
               int initialSize)
        throws IOException
Throws:
IOException
Method Detail

loadAndCheckRecord

public boolean loadAndCheckRecord(int offset,
                                  Record record)
                           throws IOException
Throws:
IOException

resize

public void resize()
            throws IOException
Throws:
IOException

force

public void force()
           throws IOException
Throws:
IOException

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

write

public void write(int offset,
                  ByteBuffer buffer)
           throws IOException
Throws:
IOException

readRecordHeader

public void readRecordHeader(int offset,
                             Record record)
                      throws IOException
Throws:
IOException

read

public void read(int offset,
                 byte[] answer)
          throws IOException
Throws:
IOException


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