
public interface OWriteAheadLog
| Modifier and Type | Field and Description |
|---|---|
static String |
MASTER_RECORD_EXTENSION |
static String |
WAL_SEGMENT_EXTENSION |
| Modifier and Type | Method and Description |
|---|---|
long |
activeSegment() |
void |
addCheckpointListener(OCheckpointRequestListener listener) |
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.
|
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(WriteableWALRecord record) |
OLogSequenceNumber |
logAtomicOperationEndRecord(long operationUnitId,
boolean rollback,
OLogSequenceNumber startLsn,
Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) |
OLogSequenceNumber |
logAtomicOperationStartRecord(boolean isRollbackSupported,
long unitId) |
OLogSequenceNumber |
logAtomicOperationStartRecord(boolean isRollbackSupported,
long unitId,
byte[] metadata) |
void |
moveLsnAfter(OLogSequenceNumber lsn)
Next LSN generated by WAL will be bigger than passed in value.
|
List<WriteableWALRecord> |
next(OLogSequenceNumber lsn,
int limit) |
long[] |
nonActiveSegments() |
File[] |
nonActiveSegments(long fromSegment) |
List<WriteableWALRecord> |
read(OLogSequenceNumber lsn,
int limit) |
void |
removeCheckpointListener(OCheckpointRequestListener listener) |
void |
removeCutTillLimit(OLogSequenceNumber lsn)
Removes LSN after which WAL log should be preserved.
|
static final String MASTER_RECORD_EXTENSION
static final String WAL_SEGMENT_EXTENSION
OLogSequenceNumber begin()
OLogSequenceNumber begin(long segmentId) throws IOException
IOExceptionOLogSequenceNumber end()
void flush()
OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId, byte[] metadata)
OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId) throws IOException
IOExceptionOLogSequenceNumber logAtomicOperationEndRecord(long operationUnitId, boolean rollback, OLogSequenceNumber startLsn, Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) throws IOException
IOExceptionOLogSequenceNumber log(WriteableWALRecord record) throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionvoid close(boolean flush)
throws IOException
IOExceptionvoid delete()
throws IOException
IOExceptionList<WriteableWALRecord> read(OLogSequenceNumber lsn, int limit) throws IOException
IOExceptionList<WriteableWALRecord> next(OLogSequenceNumber lsn, int limit) throws IOException
IOExceptionOLogSequenceNumber getFlushedLsn()
boolean cutTill(OLogSequenceNumber lsn) throws IOException
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.IOExceptionboolean cutAllSegmentsSmallerThan(long segmentId)
throws IOException
IOExceptionvoid addCheckpointListener(OCheckpointRequestListener listener)
void removeCheckpointListener(OCheckpointRequestListener listener)
void moveLsnAfter(OLogSequenceNumber lsn) throws IOException
IOExceptionvoid addCutTillLimit(OLogSequenceNumber lsn)
lsn - LSN after which cut of the WAL is not allowed.removeCutTillLimit(OLogSequenceNumber),
cutTill(OLogSequenceNumber)void removeCutTillLimit(OLogSequenceNumber lsn)
lsn - LSN after which cut of the WAL is not allowed.removeCutTillLimit(OLogSequenceNumber),
cutTill(OLogSequenceNumber)File[] nonActiveSegments(long fromSegment)
long[] nonActiveSegments()
long activeSegment()
void addEventAt(OLogSequenceNumber lsn, Runnable event)
lsn - the LSN to fire at.event - the event to fire.boolean appendNewSegment()
true if new segment is added, and false otherwise.Copyright © 2009–2025 OrientDB. All rights reserved.