public interface IgniteWriteAheadLogManager extends GridCacheSharedManager, IgniteChangeGlobalStateSupport
| Modifier and Type | Method and Description |
|---|---|
long |
currentSegment() |
boolean |
disabled(int grpId)
Checks WAL disabled for cache group.
|
WALPointer |
flush(WALPointer ptr,
boolean explicitFsync)
Makes sure that all log entries written to the log up until the specified pointer are actually written
to the underlying storage.
|
boolean |
isAlwaysWriteFullPages() |
boolean |
isFullSync() |
long |
lastArchivedSegment() |
long |
lastCompactedSegment() |
WALPointer |
lastWritePointer()
Get last written pointer.
|
WALPointer |
log(WALRecord entry)
Appends the given log entry to the write-ahead log.
|
WALPointer |
log(WALRecord entry,
RolloverType rolloverType)
Appends the given log entry to the write-ahead log.
|
void |
notchLastCheckpointPtr(WALPointer ptr)
Notifies
this about latest checkpoint pointer. |
WALRecord |
read(WALPointer ptr)
Reads WAL record by the specified pointer.
|
void |
release(WALPointer start)
Invoke this method to release WAL history since provided pointer that was previously reserved.
|
WALIterator |
replay(WALPointer start)
Invoke this method to iterate over the written log entries.
|
WALIterator |
replay(WALPointer start,
@Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> recordDeserializeFilter)
Invoke this method to iterate over the written log entries.
|
boolean |
reserve(WALPointer start)
Invoke this method to reserve WAL history since provided pointer and prevent it's deletion.
|
boolean |
reserved(WALPointer ptr)
Checks if WAL segment is under lock or reserved
|
int |
reserved(WALPointer low,
WALPointer high)
Checks if WAL segments is under lock or reserved.
|
void |
resumeLogging(WALPointer lastWrittenPtr)
Resumes logging after start.
|
long |
segmentSize(long idx)
Getting local WAL segment size.
|
int |
serializerVersion() |
int |
truncate(@Nullable WALPointer high)
Gives a hint to WAL manager to clear entries logged before the given pointer.
|
int |
walArchiveSegments() |
onDisconnected, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stoponActivate, onDeActivateboolean isAlwaysWriteFullPages()
true If we have to always write full pages.boolean isFullSync()
true if WAL will perform fair syncs on fsync call.int serializerVersion()
void resumeLogging(WALPointer lastWrittenPtr) throws IgniteCheckedException
IgniteCheckedException - If fails.WALPointer log(WALRecord entry) throws IgniteCheckedException, StorageException
entry - Entry to log.flush(WALPointer, boolean) method to make sure the record is
written to the log.IgniteCheckedException - If failed to construct log entry.StorageException - If IO error occurred while writing log entry.WALPointer log(WALRecord entry, RolloverType rolloverType) throws IgniteCheckedException, StorageException
entry - Entry to log.rolloverType - Rollover type.flush(WALPointer, boolean) method to make sure the record is
written to the log.IgniteCheckedException - If failed to construct log entry.StorageException - If IO error occurred while writing log entry.RolloverTypeWALPointer flush(WALPointer ptr, boolean explicitFsync) throws IgniteCheckedException, StorageException
ptr - Optional pointer to write. If null, will sync up to the latest record.explicitFsync - If true, data will be synced to the storage device on hardware level.ptr.
May be null, it means nothing has been flushed.IgniteCheckedException - If failed to write.StorageException - If IO exception occurred during the write. If an exception is thrown from this
method, the WAL will be invalidated and the node will be stopped.WALRecord read(WALPointer ptr) throws IgniteCheckedException, StorageException
ptr - WAL pointer.IgniteCheckedException - If failed to read.StorageException - If IO error occurred while reading WAL entries.WALIterator replay(WALPointer start) throws IgniteCheckedException, StorageException
start - Optional WAL pointer from which to start iteration.IgniteException - If failed to start iteration.StorageException - If IO error occurred while reading WAL entries.IgniteCheckedExceptionWALIterator replay(WALPointer start, @Nullable @Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> recordDeserializeFilter) throws IgniteCheckedException, StorageException
start - Optional WAL pointer from which to start iteration.recordDeserializeFilter - Specify a filter to skip WAL records. Those records will not be explicitly deserialized.IgniteException - If failed to start iteration.StorageException - If IO error occurred while reading WAL entries.IgniteCheckedExceptionboolean reserve(WALPointer start)
start - WAL pointer.void release(WALPointer start) throws IgniteCheckedException
start - WAL pointer.IgniteException - If failed to release.IgniteCheckedExceptionint truncate(@Nullable
@Nullable WALPointer high)
high - Upper border to which WAL segments will be deleted.void notchLastCheckpointPtr(WALPointer ptr)
this about latest checkpoint pointer.
Current implementations, in fact, react by keeping all WAL segments uncompacted starting from index prior to
the index of ptr. Compaction implies filtering out physical records and ZIP compression.
ptr - Pointer for which it is safe to compact the log.long currentSegment()
int walArchiveSegments()
long lastArchivedSegment()
long lastCompactedSegment()
boolean reserved(WALPointer ptr)
ptr - Pointer to check.int reserved(WALPointer low, WALPointer high)
low - Pointer since which WAL is locked or reserved. If null, checks from the oldest segment.high - Pointer for which WAL is locked or reserved.boolean disabled(int grpId)
grpId - Group id.long segmentSize(long idx)
idx - Absolute segment index.0 if size is unknown.WALPointer lastWritePointer()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021