protected final class RecordBuffer.LightweightUndoable extends LazyUndoable
Undoable
interface
which restores to the record buffer the current record and snapshot
which were active at the time of backup.
An instance of this class is registered for undo support with the
TransactionManager
during record buffer construction.
Modifier and Type | Field and Description |
---|---|
private Persistable |
activeRecord
DMO which is active in record buffer at the time of backup
|
private Persistable |
activeSnapshot
Snapshot which is active in record buffer at the time of backup
|
private LockType |
pinnedLockType
Lock type pinned by the active record at the time of backup
|
Modifier | Constructor and Description |
---|---|
protected |
LightweightUndoable()
Default c'tor - is a no-op.
|
protected |
LightweightUndoable(boolean global)
Create a new instance and mark it as global depending on the associated flag.
|
Modifier and Type | Method and Description |
---|---|
void |
assign(Undoable from)
Restore to the record buffer the current record and current
reversible which were set at the time the record buffer was backed
up for undo support.
|
void |
checkUndoable(boolean changed)
Check if this undoable has changed; if so, and we are in a transaction block (and not
rolling back ), then register this instance with all blocks up the
stack, which were started after the object's last save transaction level. |
Undoable |
deepCopy()
Store a reference to the record currently active in the record
buffer in a new instance of this class and return it.
|
protected boolean |
isUndoable()
Check if this instance is undoable.
|
changed, checkUndoable, checkUndoable, isGlobal, markUndoable, popBlock, rollback, setGlobal
private Persistable activeRecord
private Persistable activeSnapshot
private LockType pinnedLockType
protected LightweightUndoable()
protected LightweightUndoable(boolean global)
global
- Flag identifying if this buffer is associated with a global temp-table.public Undoable deepCopy()
public void assign(Undoable from)
from
- An instance of this class containing the backup state to be
restored.public void checkUndoable(boolean changed)
rolling back
), then register this instance with all blocks up the
stack, which were started after the object's last save transaction level.checkUndoable
in class LazyUndoable
changed
- Flag indicating if this undoable has changed or not.protected boolean isUndoable()
isUndoable
in class LazyUndoable
RecordBuffer.isUndoable()
.