Package fr.dyade.aaa.ext
Class NGTransaction.LogFile
- java.lang.Object
-
- java.io.RandomAccessFile
-
- fr.dyade.aaa.ext.NGTransaction.LogFile
-
- All Implemented Interfaces:
Closeable,DataInput,DataOutput,AutoCloseable
- Enclosing class:
- NGTransaction
public static class NGTransaction.LogFile extends RandomAccessFile
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intBUFLEN(package private) Filedir(package private) intlogCounterNumber of valid operation in this log file(package private) intlogidxUnique index of this log file(package private) static intmaxUsedIdxMaximum index of existing log files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackup(File backupDir)voidrenameTo()-
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
-
-
-
-
Field Detail
-
logidx
int logidx
Unique index of this log file
-
logCounter
int logCounter
Number of valid operation in this log file
-
dir
File dir
-
maxUsedIdx
static int maxUsedIdx
Maximum index of existing log files
-
BUFLEN
static final int BUFLEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogFile
public LogFile(File dir, int logidx, String mode) throws FileNotFoundException
Creates a log file.- Parameters:
dir- The directorylogidx- The log indexmode- The mode- Throws:
FileNotFoundException- some other error occurs while opening or creating the file.
-
-
Method Detail
-
renameTo
public void renameTo()
-
backup
public void backup(File backupDir) throws IOException
- Throws:
IOException
-
-