Interface Wal
public interface Wal
Write-ahead log.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean onError) Closes the log.voidFinishes a checkpoint.booleanChecks if the log has entries that were added after the last checkpoint had started.booleanChecks if the log has entries that had been added before the last checkpoint started.voidlogDeferred(byte[] data, int offset, int length) Logs record deferredly.voidlogImmediately(byte[] data, int offset, int length) Logs record immediately.voidProcesses the entries that were added after the last checkpoint had started.voidProcesses the entries that had been added before the last checkpoint started.longsize()Gets size.voidstart()Starts the log.voidStarts a checkpoint.
-
Method Details
-
start
Starts the log.- Throws:
IgniteCheckedException- in case of a failure.
-
close
Closes the log.- Parameters:
onError- The flag indicating whether closing was requested on error.- Throws:
IgniteCheckedException- in case of a failure.
-
startCheckpoint
Starts a checkpoint.- Throws:
IgniteCheckedException- in case of a failure.
-
finishCheckpoint
Finishes a checkpoint.- Throws:
IgniteCheckedException- in case of a failure.
-
logImmediately
Logs record immediately.- Parameters:
data- An array containing the record data. May not benull.offset- The offset of the record data within the array. Must not be negative.length- The length of the record data. Must be greater than0.- Throws:
IgniteCheckedException- in case of a failure.
-
logDeferred
Logs record deferredly. It is guaranteed that the record is written before the nearest checkpoint starts.- Parameters:
data- An array containing the record data. May not benull.offset- The offset of the record data within the array. Must not be negative.length- The length of the record data. Must be greater than0.- Throws:
IgniteCheckedException- in case of a failure.
-
size
Gets size.- Returns:
- Size in bytes.
- Throws:
IgniteCheckedException- in case of a failure.
-
hasEntriesBeforeLastCheckpointStart
Checks if the log has entries that had been added before the last checkpoint started.- Returns:
trueif the log has entries that had been added before the last checkpoint started,falseotherwise.- Throws:
IgniteCheckedException- in case of a failure.
-
hasEntriesAfterLastCheckpointStart
Checks if the log has entries that were added after the last checkpoint had started.- Returns:
trueif the log has entries that were added after the last checkpoint had started,falseotherwise.- Throws:
IgniteCheckedException- in case of a failure.
-
processEntriesBeforeLastCheckpointStart
void processEntriesBeforeLastCheckpointStart(Wal.EntryProcessor processor) throws IgniteCheckedException Processes the entries that had been added before the last checkpoint started.- Parameters:
processor- The processor. May not benull.- Throws:
IgniteCheckedException- in case of a failure.
-
processEntriesAfterLastCheckpointStart
void processEntriesAfterLastCheckpointStart(Wal.EntryProcessor processor) throws IgniteCheckedException Processes the entries that were added after the last checkpoint had started.- Parameters:
processor- The processor. May not benull.- Throws:
IgniteCheckedException- in case of a failure.
-