public static class NGTransaction.LogFile extends RandomAccessFile
Modifier and Type | Field and Description |
---|---|
(package private) static int |
BUFLEN |
(package private) File |
dir |
(package private) int |
logCounter
Number of valid operation in this log file
|
(package private) int |
logidx
Unique index of this log file
|
(package private) static int |
maxUsedIdx
Maximum index of existing log files
|
Constructor and Description |
---|
LogFile(File dir,
int logidx,
String mode)
Creates a log file.
|
Modifier and Type | Method and Description |
---|---|
void |
backup(File backupDir) |
void |
renameTo() |
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
int logidx
int logCounter
File dir
static int maxUsedIdx
static final int BUFLEN
public LogFile(File dir, int logidx, String mode) throws FileNotFoundException
dir
- The directorylogidx
- The log indexmode
- The modeFileNotFoundException
- some other error occurs while opening or creating the file.public void renameTo()
public void backup(File backupDir) throws IOException
IOException
Copyright © 2022 ScalAgent D.T.. All rights reserved.