
public class OMemoryWriteAheadLog extends OAbstractWriteAheadLog
MASTER_RECORD_EXTENSION, WAL_SEGMENT_EXTENSION| Constructor and Description |
|---|
OMemoryWriteAheadLog() |
| Modifier and Type | Method and Description |
|---|---|
long |
activeSegment() |
void |
addCutTillLimit(OLogSequenceNumber lsn)
Adds LSN after which WAL log should be preserved.
|
void |
addEventAt(OLogSequenceNumber lsn,
Runnable event)
Adds the event to fire when this write ahead log instances reaches the given LSN.
|
void |
addFullCheckpointListener(OCheckpointRequestListener listener) |
void |
addLowDiskSpaceListener(OLowDiskSpaceListener listener) |
boolean |
appendNewSegment()
Adds new segment so all subsequent log entries will be added to this new segment.
|
OLogSequenceNumber |
begin() |
OLogSequenceNumber |
begin(long segmentId) |
void |
close() |
void |
close(boolean flush) |
boolean |
cutAllSegmentsSmallerThan(long segmentId) |
boolean |
cutTill(OLogSequenceNumber lsn)
Cut WAL content till passed in value of LSN at maximum in many cases smaller portion of WAL may be cut.
|
void |
delete() |
OLogSequenceNumber |
end() |
void |
flush() |
OLogSequenceNumber |
getFlushedLsn() |
OLogSequenceNumber |
log(OWriteableWALRecord record) |
OLogSequenceNumber |
logAtomicOperationEndRecord(long operationUnitId,
boolean rollback,
OLogSequenceNumber startLsn,
Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) |
OLogSequenceNumber |
logAtomicOperationStartRecord(boolean isRollbackSupported,
long unitId) |
void |
moveLsnAfter(OLogSequenceNumber lsn)
Next LSN generated by WAL will be bigger than passed in value.
|
List<OWriteableWALRecord> |
next(OLogSequenceNumber lsn,
int limit) |
long[] |
nonActiveSegments() |
File[] |
nonActiveSegments(long fromSegment) |
List<OWriteableWALRecord> |
read(OLogSequenceNumber lsn,
int limit) |
void |
removeCutTillLimit(OLogSequenceNumber lsn)
Removes LSN after which WAL log should be preserved.
|
void |
removeFullCheckpointListener(OCheckpointRequestListener listener) |
void |
removeLowDiskSpaceListener(OLowDiskSpaceListener listener) |
getLastCheckpoint, logFullCheckpointEnd, logFullCheckpointStart, logFuzzyCheckPointEnd, logFuzzyCheckPointStartpublic OLogSequenceNumber begin()
public OLogSequenceNumber end()
public void flush()
public OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId) throws IOException
IOExceptionpublic OLogSequenceNumber logAtomicOperationEndRecord(long operationUnitId, boolean rollback, OLogSequenceNumber startLsn, Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) throws IOException
IOExceptionpublic OLogSequenceNumber log(OWriteableWALRecord record) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void close(boolean flush)
throws IOException
IOExceptionpublic void delete()
throws IOException
IOExceptionpublic List<OWriteableWALRecord> read(OLogSequenceNumber lsn, int limit) throws IOException
IOExceptionpublic List<OWriteableWALRecord> next(OLogSequenceNumber lsn, int limit) throws IOException
IOExceptionpublic OLogSequenceNumber getFlushedLsn()
public boolean cutTill(OLogSequenceNumber lsn) throws IOException
OWriteAheadLogOWriteAheadLog.addCutTillLimit(OLogSequenceNumber) then "protected" part of WAL will be preserved for
sure.lsn - 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 void addFullCheckpointListener(OCheckpointRequestListener listener)
public void removeFullCheckpointListener(OCheckpointRequestListener listener)
public void moveLsnAfter(OLogSequenceNumber lsn)
OWriteAheadLogpublic void addCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLoglsn - LSN after which cut of the WAL is not allowed.OWriteAheadLog.removeCutTillLimit(OLogSequenceNumber),
OWriteAheadLog.cutTill(OLogSequenceNumber)public void removeCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLoglsn - LSN after which cut of the WAL is not allowed.OWriteAheadLog.removeCutTillLimit(OLogSequenceNumber),
OWriteAheadLog.cutTill(OLogSequenceNumber)public File[] nonActiveSegments(long fromSegment)
public long[] nonActiveSegments()
public long activeSegment()
public void addLowDiskSpaceListener(OLowDiskSpaceListener listener)
public void removeLowDiskSpaceListener(OLowDiskSpaceListener listener)
public OLogSequenceNumber begin(long segmentId)
public boolean cutAllSegmentsSmallerThan(long segmentId)
public void addEventAt(OLogSequenceNumber lsn, Runnable event)
OWriteAheadLoglsn - the LSN to fire at.event - the event to fire.public boolean appendNewSegment()
OWriteAheadLogtrue if new segment is added, and false otherwise.Copyright © 2009–2025 OrientDB. All rights reserved.