
public final class OCASDiskWriteAheadLog extends Object implements OWriteAheadLog
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_MAX_CACHE_SIZE |
MASTER_RECORD_EXTENSION, WAL_SEGMENT_EXTENSION| Constructor and Description |
|---|
OCASDiskWriteAheadLog(String storageName,
Path storagePath,
Path walPath,
int maxPagesCacheSize,
int bufferSize,
long segmentsInterval,
long maxSegmentSize,
int commitDelay,
boolean filterWALFiles,
Locale locale,
long walSizeHardLimit,
long freeSpaceLimit,
int fsyncInterval,
boolean keepSingleWALSegment,
boolean callFsync,
boolean printPerformanceStatistic,
int statisticPrintInterval) |
protected static final int DEFAULT_MAX_CACHE_SIZE
public OCASDiskWriteAheadLog(String storageName, Path storagePath, Path walPath, int maxPagesCacheSize, int bufferSize, long segmentsInterval, long maxSegmentSize, int commitDelay, boolean filterWALFiles, Locale locale, long walSizeHardLimit, long freeSpaceLimit, int fsyncInterval, boolean keepSingleWALSegment, boolean callFsync, boolean printPerformanceStatistic, int statisticPrintInterval) throws IOException
IOExceptionpublic int pageSize()
protected int maxCacheSize()
public List<OWriteableWALRecord> read(OLogSequenceNumber lsn, int limit) throws IOException
read in interface OWriteAheadLogIOExceptionpublic List<OWriteableWALRecord> next(OLogSequenceNumber lsn, int limit) throws IOException
next in interface OWriteAheadLogIOExceptionpublic void addEventAt(OLogSequenceNumber lsn, Runnable event)
OWriteAheadLogaddEventAt in interface OWriteAheadLoglsn - the LSN to fire at.event - the event to fire.public void delete()
throws IOException
delete in interface OWriteAheadLogIOExceptionpublic void addCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLogaddCutTillLimit in interface OWriteAheadLoglsn - LSN after which cut of the WAL is not allowed.OWriteAheadLog.removeCutTillLimit(OLogSequenceNumber),
OWriteAheadLog.cutTill(OLogSequenceNumber)public void removeCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLogremoveCutTillLimit in interface OWriteAheadLoglsn - LSN after which cut of the WAL is not allowed.OWriteAheadLog.removeCutTillLimit(OLogSequenceNumber),
OWriteAheadLog.cutTill(OLogSequenceNumber)public OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId)
logAtomicOperationStartRecord in interface OWriteAheadLogpublic OLogSequenceNumber logAtomicOperationEndRecord(long operationUnitId, boolean rollback, OLogSequenceNumber startLsn, Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata)
logAtomicOperationEndRecord in interface OWriteAheadLogpublic OLogSequenceNumber logFuzzyCheckPointStart(OLogSequenceNumber flushedLsn)
logFuzzyCheckPointStart in interface OWriteAheadLogpublic OLogSequenceNumber logFuzzyCheckPointEnd()
logFuzzyCheckPointEnd in interface OWriteAheadLogpublic OLogSequenceNumber logFullCheckpointStart()
logFullCheckpointStart in interface OWriteAheadLogpublic OLogSequenceNumber logFullCheckpointEnd()
logFullCheckpointEnd in interface OWriteAheadLogpublic OLogSequenceNumber getLastCheckpoint()
getLastCheckpoint in interface OWriteAheadLogpublic OLogSequenceNumber log(OWriteableWALRecord writeableRecord)
log in interface OWriteAheadLogpublic OLogSequenceNumber begin()
begin in interface OWriteAheadLogpublic OLogSequenceNumber begin(long segmentId)
begin in interface OWriteAheadLogpublic boolean cutAllSegmentsSmallerThan(long segmentId)
throws IOException
cutAllSegmentsSmallerThan in interface OWriteAheadLogIOExceptionpublic boolean cutTill(OLogSequenceNumber lsn) throws IOException
OWriteAheadLogOWriteAheadLog.addCutTillLimit(OLogSequenceNumber) then "protected" part of WAL will be preserved for
sure.cutTill in interface OWriteAheadLoglsn - Maximum value of LSN till WAL will be cut.true if some portion of WAL will be cut and false if WAL left untouched.IOExceptionpublic long activeSegment()
activeSegment in interface OWriteAheadLogpublic boolean appendNewSegment()
OWriteAheadLogappendNewSegment in interface OWriteAheadLogtrue if new segment is added, and false otherwise.public void appendSegment(long segmentIndex)
public Path getWMRFile()
public void moveLsnAfter(OLogSequenceNumber lsn)
OWriteAheadLogmoveLsnAfter in interface OWriteAheadLogpublic long[] nonActiveSegments()
nonActiveSegments in interface OWriteAheadLogpublic File[] nonActiveSegments(long fromSegment)
nonActiveSegments in interface OWriteAheadLogpublic void flush()
flush in interface OWriteAheadLogpublic void close()
throws IOException
close in interface OWriteAheadLogIOExceptionpublic void close(boolean flush)
throws IOException
close in interface OWriteAheadLogIOExceptionpublic void addLowDiskSpaceListener(OLowDiskSpaceListener listener)
addLowDiskSpaceListener in interface OWriteAheadLogpublic void removeLowDiskSpaceListener(OLowDiskSpaceListener listener)
removeLowDiskSpaceListener in interface OWriteAheadLogpublic void addFullCheckpointListener(OCheckpointRequestListener listener)
addFullCheckpointListener in interface OWriteAheadLogpublic void removeFullCheckpointListener(OCheckpointRequestListener listener)
removeFullCheckpointListener in interface OWriteAheadLogpublic void addSegmentOverflowListener(OSegmentOverflowListener listener)
public OLogSequenceNumber getFlushedLsn()
getFlushedLsn in interface OWriteAheadLogpublic OLogSequenceNumber end()
end in interface OWriteAheadLogCopyright © 2009–2025 OrientDB. All rights reserved.