Package com.ultikits.ultitools.manager
Class JsonTransactionManager.Context
java.lang.Object
com.ultikits.ultitools.manager.JsonTransactionManager.Context
- Enclosing class:
JsonTransactionManager
Internal class to hold JSON transaction state -- the JSON analogue of
DataSourceTransactionManager.TransactionContext, minus anything JDBC-specific.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intOne entry per operator captured so far this transaction, in first-touch order -- insertion order matters if two operators' restores could ever interact, so this is aLinkedHashMaprather than aHashMap.(package private) booleanD-08: set by an innerJsonTransactionManager.rollback()at depth > 1 instead of tearing the context down. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
depth
int depth -
rollbackOnly
boolean rollbackOnlyD-08: set by an innerJsonTransactionManager.rollback()at depth > 1 instead of tearing the context down. The outerJsonTransactionManager.commit()at depth 1 checks this before committing -- if set, it restores every captured snapshot and throwsUnexpectedRollbackExceptionrather than silently committing (or silently returning) as if the inner rollback never happened. -
restorers
One entry per operator captured so far this transaction, in first-touch order -- insertion order matters if two operators' restores could ever interact, so this is aLinkedHashMaprather than aHashMap. Each value is a zero-argumentRunnablethat restores exactly one operator from the snapshot captured for it, built once byJsonTransactionManager.captureIfAbsent(java.lang.Object, java.util.function.Supplier<java.lang.Object>, java.util.function.Consumer<java.lang.Object>)and never mutated afterward.
-
-
Constructor Details
-
Context
private Context()
-