public class WriteAheadLog
WAL shared between StoreWAL
Modifier and Type | Field and Description |
---|---|
static int |
I_BYTE_ARRAY |
static int |
I_COMMIT |
static int |
I_EOF |
static int |
I_LONG |
static int |
I_PREALLOCATE |
static int |
I_RECORD |
static int |
I_ROLLBACK |
static int |
I_SKIP_MANY |
static int |
I_SKIP_SINGLE |
static int |
I_TOMBSTONE |
static long |
MAX_FILE_RESERVE |
static long |
MAX_FILE_SIZE |
static WriteAheadLog.WALReplay |
NOREPLAY
does nothing
|
static int |
WAL_HEADER
4 byte file header
|
static long |
WAL_SEAL |
Volume |
curVol |
long |
featureBitMap |
boolean |
fileDeleteAfterOpen |
long |
fileNum |
long |
fileOffset |
java.util.concurrent.locks.ReentrantLock |
fileOffsetLock |
int |
lastChecksum |
long |
lastChecksumOffset |
int |
pointerFileBites |
long |
pointerFileMask |
int |
pointerOffsetBites |
long |
pointerOffsetMask |
int |
pointerSizeBites |
long |
pointerSizeMask |
java.util.List<org.mapdb.volume.Volume> |
volumes |
java.util.List<org.mapdb.volume.Volume> |
walRec
record WALs, store recid-record pairs. Created during compaction when memory allocator is not available
|
Constructor and Description |
---|
WriteAheadLog() |
WriteAheadLog() |
Modifier and Type | Method and Description |
---|---|
long |
allocate()
Allocate space in WAL
|
int |
checksum() |
void |
close() |
void |
commit() |
void |
destroyWalFiles() |
void |
ensureFileReady() |
boolean |
fileLoad() |
void |
fileOffsetSet() |
java.lang.Iterable<java.lang.String> |
getAllFiles() |
long |
getNumberOfFiles() |
java.lang.String |
getWalFileName() |
void |
initFailedCloseFiles() |
void |
replayWAL() |
void |
rollback() |
void |
seal() |
void |
startNextFile() |
void |
sync() |
DataInput2 |
walGetByteArray()
Retrieve
DataInput from WAL. This data were written by |
byte[] |
walGetByteArray2()
Retrieve
byte[] from WAL. This data were written by |
byte[] |
walGetRecord() |
long |
walPointer() |
long |
walPointerToFileNum() |
long |
walPointerToOffset() |
int |
walPointerToSize() |
long |
walPutByteArray()
Puts instruction into WAL. It should write part of
byte[] at given offset. This value returns pointer to WAL, which can be used to retrieve data back with . Pointer is composed of file number, and offset in WAL file. |
void |
walPutLong()
Put 8 byte long into WAL.
|
void |
walPutPreallocate() |
long |
walPutRecord() |
void |
walPutTombstone() |
public static int WAL_HEADER
4 byte file header
public static long WAL_SEAL
public static int I_EOF
public static int I_LONG
public static int I_BYTE_ARRAY
public static int I_SKIP_MANY
public static int I_SKIP_SINGLE
public static int I_RECORD
public static int I_TOMBSTONE
public static int I_PREALLOCATE
public static int I_COMMIT
public static int I_ROLLBACK
public static long MAX_FILE_SIZE
public static long MAX_FILE_RESERVE
public long featureBitMap
public int pointerOffsetBites
public long pointerOffsetMask
public int pointerSizeBites
public long pointerSizeMask
public int pointerFileBites
public long pointerFileMask
public boolean fileDeleteAfterOpen
public int lastChecksum
public long lastChecksumOffset
public static WriteAheadLog.WALReplay NOREPLAY
does nothing
public long fileOffset
public java.util.concurrent.locks.ReentrantLock fileOffsetLock
public java.util.List<org.mapdb.volume.Volume> volumes
public java.util.List<org.mapdb.volume.Volume> walRec
record WALs, store recid-record pairs. Created during compaction when memory allocator is not available
public Volume curVol
public long fileNum
public void initFailedCloseFiles()
public void close()
public void seal()
public void startNextFile()
public void rollback()
public void commit()
public int checksum()
public boolean fileLoad()
public void sync()
public java.lang.Iterable<java.lang.String> getAllFiles()
public long allocate()
Allocate space in WAL
public void fileOffsetSet()
public void replayWAL()
public void destroyWalFiles()
public java.lang.String getWalFileName()
public long getNumberOfFiles()
public DataInput2 walGetByteArray()
Retrieve DataInput
from WAL. This data were written by WriteAheadLog.walPutByteArray
WriteAheadLog.walPutByteArray
public byte[] walGetByteArray2()
Retrieve byte[]
from WAL. This data were written by WriteAheadLog.walPutByteArray
WriteAheadLog.walPutByteArray
public long walPointerToOffset()
public long walPointerToFileNum()
public int walPointerToSize()
public byte[] walGetRecord()
public long walPutByteArray()
Puts instruction into WAL. It should write part of byte[]
at given offset. This value returns pointer to WAL, which can be used to retrieve data back with
. Pointer is composed of file number, and offset in WAL file. WriteAheadLog.walGetByteArray
WriteAheadLog.walGetByteArray
public long walPointer()
public long walPutRecord()
public void walPutLong()
Put 8 byte long into WAL.
public void ensureFileReady()
public void walPutTombstone()
public void walPutPreallocate()