private static class SavepointManager.Block
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Set<BaseRecord> |
changed
Records which have been changed in the scope of this block
|
private boolean |
changedIsIterated
Temporary trap for a ConcurrentModification which occurs in peculiar cases.
|
private BaseRecord |
changedLastIteration
The current element being processed or the last one which was processed.
|
private boolean |
noUndoRolledBack
Have we rolled back NO-UNDO changes in this block which will need to be re-applied?
|
private java.util.List<SQLRedo> |
redoable
List of SQL redo helpers for NO-UNDO records, shared among all blocks
|
private int |
redoHead
Starting index for this block in full transaction redoable list
|
private java.sql.Savepoint |
savepoint
Database savepoint for a sub-transaction block (
null for full transaction |
private int |
txLevel
Transaction nesting level of this block (0 = full transaction, 1 = first sub-transaction, etc.)
|
Constructor and Description |
---|
Block(int txLevel,
java.util.List<SQLRedo> redoable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
commit()
Notify all changed, undoable records that the current transaction has been committed.
|
(package private) void |
invalidateFastFind()
Notify the FastFind cache that the changed tables need to be invalidated.
|
(package private) boolean |
isTrackingNoUndo()
Indicate whether this block is tracking any NO-UNDO records.
|
(package private) void |
maybeReapplyNoUndo(Session session)
Re-apply any changes to no-undo records which were rolled back in the most recent
savepoint or full transaction.
|
(package private) void |
rollback()
Roll back changes to undoable records and activate redoable actions for NO-UNDO records.
|
(package private) void |
rollUp(SavepointManager.Block from)
Add all changed, undoable records stored in the
from Block into the current block. |
(package private) void |
setSavepoint(java.sql.Savepoint savepoint)
Set this block's savepoint.
|
java.lang.String |
toString()
Get a debug text representation of this object.
|
private final int txLevel
private final java.util.Set<BaseRecord> changed
private boolean changedIsIterated
private BaseRecord changedLastIteration
private final java.util.List<SQLRedo> redoable
private final int redoHead
private java.sql.Savepoint savepoint
null
for full transactionprivate boolean noUndoRolledBack
Block(int txLevel, java.util.List<SQLRedo> redoable)
void setSavepoint(java.sql.Savepoint savepoint)
savepoint
- Database savepoint to be stored for this block. Must be null
if the
current block represents a full transaction.void rollUp(SavepointManager.Block from)
from
Block
into the current block.from
- Block from which to copy information into this block.void commit()
void rollback() throws PersistenceException
PersistenceException
void invalidateFastFind()
boolean isTrackingNoUndo()
true
if there are any NO-UNDO records associated with this block, else
false
.void maybeReapplyNoUndo(Session session)
session
- Database session helper object.public java.lang.String toString()
toString
in class java.lang.Object