fr.dyade.aaa.util
Class NGTransaction.LogFile

java.lang.Object
  extended by java.io.RandomAccessFile
      extended by fr.dyade.aaa.util.NGTransaction.LogFile
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput, java.io.DataOutput
Enclosing class:
NGTransaction

public static class NGTransaction.LogFile
extends java.io.RandomAccessFile


Field Summary
(package private)  java.io.File dir
           
(package private)  int logCounter
          Number of valid operation in this log file
(package private)  int logidx
          Unique index of this log file
 
Constructor Summary
NGTransaction.LogFile(java.io.File dir, int logidx)
          Creates a random access file stream to read from and to write to the file specified by the File argument.
 
Method Summary
 void renameTo(int newidx)
           
 
Methods inherited from class java.io.RandomAccessFile
close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logidx

int logidx
Unique index of this log file


logCounter

int logCounter
Number of valid operation in this log file


dir

java.io.File dir
Constructor Detail

NGTransaction.LogFile

public NGTransaction.LogFile(java.io.File dir,
                             int logidx)
                      throws java.io.FileNotFoundException
Creates a random access file stream to read from and to write to the file specified by the File argument. The file is open in "rwd" mode and require that every update to the file's content be written synchronously to the underlying storage device.

Parameters:
file - the specified file.
Throws:
java.io.FileNotFoundException
Method Detail

renameTo

public void renameTo(int newidx)


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.