static final class NTransaction.LogFile extends ByteArrayOutputStream
Modifier and Type | Field and Description |
---|---|
(package private) int |
commitCount
Number of commit operation since starting up.
|
(package private) int |
current
Current file pointer in log
|
private static byte[] |
emptyUTFString |
(package private) int |
garbageCount
Number of garbage operation since starting up.
|
(package private) long |
garbageTime
Cumulated time of garbage operations since starting up.
|
(package private) long |
garbageTimeOut
Maximum delay between 2 garbages.
|
(package private) long |
lastGarbageTime
Date of last garbage.
|
private static String |
LockPathname
Coherence lock filename
|
(package private) Hashtable<Object,Operation> |
log
Log of all operations already committed but not reported on disk.
|
(package private) RandomAccessFile |
logFile
log file
|
(package private) int |
logMemorySize |
private String |
mode |
private Repository |
repository |
buf, count
Constructor and Description |
---|
LogFile(File dir,
Repository repository,
boolean syncOnWrite) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
commit(Hashtable<Object,Operation> ctxlog)
Reports all buffered operations in logs.
|
private void |
garbage()
Reports all logged operations on disk.
|
(package private) int |
getLogFileSize()
Returns the size of disk log in bytes.
|
(package private) void |
stop() |
(package private) void |
writeInt(int v) |
(package private) void |
writeUTF(String str) |
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
flush, write
Hashtable<Object,Operation> log
RandomAccessFile logFile
int current
int commitCount
int garbageCount
long garbageTime
long lastGarbageTime
long garbageTimeOut
private static final String LockPathname
private Repository repository
private String mode
private static final byte[] emptyUTFString
int logMemorySize
LogFile(File dir, Repository repository, boolean syncOnWrite) throws IOException
IOException
int getLogFileSize()
void writeUTF(String str)
void writeInt(int v)
void commit(Hashtable<Object,Operation> ctxlog) throws IOException
ctxlog
- the local transaction log.IOException
- an error occurs.private final void garbage() throws IOException
IOException
- an error occurs.void stop()
Copyright © 2022 ScalAgent D.T.. All rights reserved.