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(OOperationUnitId operationUnitId,
boolean rollback,
OLogSequenceNumber startLsn,
Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) |
OLogSequenceNumber |
logAtomicOperationStartRecord(boolean isRollbackSupported,
OOperationUnitId 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) |
checkForClose, getLastCheckpoint, logFullCheckpointEnd, logFullCheckpointStart, logFuzzyCheckPointEnd, logFuzzyCheckPointStart
public OLogSequenceNumber begin()
public OLogSequenceNumber end()
public void flush()
public OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, OOperationUnitId unitId) throws IOException
IOException
public OLogSequenceNumber logAtomicOperationEndRecord(OOperationUnitId operationUnitId, boolean rollback, OLogSequenceNumber startLsn, Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) throws IOException
IOException
public OLogSequenceNumber log(OWriteableWALRecord record) throws IOException
IOException
public void close() throws IOException
IOException
public void close(boolean flush) throws IOException
IOException
public void delete() throws IOException
IOException
public List<OWriteableWALRecord> read(OLogSequenceNumber lsn, int limit) throws IOException
IOException
public List<OWriteableWALRecord> next(OLogSequenceNumber lsn, int limit) throws IOException
IOException
public OLogSequenceNumber getFlushedLsn()
public boolean cutTill(OLogSequenceNumber lsn) throws IOException
OWriteAheadLog
OWriteAheadLog.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.IOException
public void addFullCheckpointListener(OCheckpointRequestListener listener)
public void removeFullCheckpointListener(OCheckpointRequestListener listener)
public void moveLsnAfter(OLogSequenceNumber lsn)
OWriteAheadLog
public void addCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLog
lsn
- LSN after which cut of the WAL is not allowed.OWriteAheadLog.removeCutTillLimit(OLogSequenceNumber)
,
OWriteAheadLog.cutTill(OLogSequenceNumber)
public void removeCutTillLimit(OLogSequenceNumber lsn)
OWriteAheadLog
lsn
- 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)
OWriteAheadLog
lsn
- the LSN to fire at.event
- the event to fire.public boolean appendNewSegment()
OWriteAheadLog
true
if new segment is added, and false
otherwise.Copyright © 2009–2019 OrientDB. All rights reserved.