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() |
int |
lastOperationId() |
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
IOException
OLogSequenceNumber end()
void flush()
OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId, byte[] metadata)
OLogSequenceNumber logAtomicOperationStartRecord(boolean isRollbackSupported, long unitId) throws IOException
IOException
OLogSequenceNumber logAtomicOperationEndRecord(long operationUnitId, boolean rollback, OLogSequenceNumber startLsn, Map<String,OAtomicOperationMetadata<?>> atomicOperationMetadata) throws IOException
IOException
OLogSequenceNumber log(WriteableWALRecord record) throws IOException
IOException
int lastOperationId()
void close() throws IOException
IOException
void close(boolean flush) throws IOException
IOException
void delete() throws IOException
IOException
List<WriteableWALRecord> read(OLogSequenceNumber lsn, int limit) throws IOException
IOException
List<WriteableWALRecord> next(OLogSequenceNumber lsn, int limit) throws IOException
IOException
OLogSequenceNumber 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.IOException
boolean cutAllSegmentsSmallerThan(long segmentId) throws IOException
IOException
void addCheckpointListener(OCheckpointRequestListener listener)
void removeCheckpointListener(OCheckpointRequestListener listener)
void moveLsnAfter(OLogSequenceNumber lsn) throws IOException
IOException
void 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–2021 OrientDB. All rights reserved.