public interface Logger
Modifier and Type | Method and Description |
---|---|
void |
flush(LogInstant where)
Flush all unwritten log record up to the log instance indicated to disk.
|
void |
flushAll()
Flush all unwritten log to disk
|
LogInstant |
logAndDo(RawTransaction xact,
Loggable operation)
Log the loggable operation under the context of the transaction and then
apply the operation to the RawStore.
|
LogInstant |
logAndUndo(RawTransaction xact,
Compensation operation,
LogInstant undoInstant,
LimitObjectInput in)
Log the compensation operation under the context of the transaction
and then apply the undo to the RawStore.
|
void |
reprepare(RawTransaction t,
TransactionId undoId,
LogInstant undoStopAt,
LogInstant undoStartAt)
During recovery re-prepare a transaction.
|
void |
undo(RawTransaction t,
TransactionId undoId,
LogInstant undoStopAt,
LogInstant undoStartAt)
Undo transaction.
|
LogInstant logAndDo(RawTransaction xact, Loggable operation) throws StandardException
xact
- the transaction that is affecting the changeoperation
- the loggable operation that describes the changeStandardException
- Standard Derby error policyLogInstant logAndUndo(RawTransaction xact, Compensation operation, LogInstant undoInstant, LimitObjectInput in) throws StandardException
xact
- the transaction that is affecting the undooperation
- the compensation operationundoInstant
- the logInstant of the change that is to be undonein
- optional dataStandardException
- Standard Derby error policyvoid flush(LogInstant where) throws StandardException
where
- flush log up to hereStandardException
- cannot flush due to sync errorvoid flushAll() throws StandardException
StandardException
- cannot flush due to sync errorvoid reprepare(RawTransaction t, TransactionId undoId, LogInstant undoStopAt, LogInstant undoStartAt) throws StandardException
After redo() and undo(), this routine is called on all outstanding in-doubt (prepared) transactions. This routine re-acquires all logical write locks for operations in the xact, and then modifies the transaction table entry to make the transaction look as if it had just been prepared following startup after recovery.
t
- is the transaction performing the re-prepareundoId
- is the transaction ID to be re-preparedundoStopAt
- is where the log instant (inclusive) where the
re-prepare should stop.undoStartAt
- is the log instant (inclusive) where re-prepare
should begin, this is normally the log instant of
the last log record of the transaction that is to
be re-prepare. If null, then re-prepare starts
from the end of the log.StandardException
- Standard exception policy.void undo(RawTransaction t, TransactionId undoId, LogInstant undoStopAt, LogInstant undoStartAt) throws StandardException
t
- is the transaction performing the rollbackundoId
- is the transaction ID to be rolled backundoStopAt
- is where the log instant (inclusive) where
the rollback should stop.undoStartAt
- is the log instant (inclusive) where rollback
should begin, this is normally the log instant of
the last log record of the transaction that is
to be rolled back.
If null, then rollback starts from the end of the log.StandardException
- Standard Derby error policyApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.