org.apache.activeio.journal.active
Class LogFile

java.lang.Object
  extended by org.apache.activeio.journal.active.LogFile

public final class LogFile
extends Object

Allows read/append access to a LogFile.

Version:
$Revision: 1.1 $

Constructor Summary
LogFile(File file, int initialSize)
           
 
Method Summary
 void copyTo(File location)
           
 void dispose()
           
 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()

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

copyTo

public void copyTo(File location)
            throws IOException
Throws:
IOException


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.