static class TxWrapper.AggresiveFlushWrapper extends java.lang.Object implements Commitable
Commitable that suppressed the commits and rollbacks. This should
be used in aggressive flushing contexts that are not registered as transactions. This is usually
the case with forEach constructs that should aggressively validate and flush records after
each iteration, even if not inside a transaction.| Modifier and Type | Field and Description |
|---|---|
private Commitable |
commitable
The proxied transaction wrapper which has its commit and rollback suppressed
|
| Constructor and Description |
|---|
AggresiveFlushWrapper(Commitable commitable)
Basic constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit(boolean transaction)
Saves any temporary state to the persistent form or storage that is
associated with this class.
|
void |
rollback(boolean transaction)
Notifies that a rollback has just occurred (all state maintained
through the
Undoable interface has been already rolled back). |
void |
validate(boolean transaction,
boolean aggressiveFlush)
Notifies that a block is about to be normally exited or normally
iterated and that any deferred validation processing should be executed.
|
private Commitable commitable
public AggresiveFlushWrapper(Commitable commitable)
commitable - The Commitable to be proxiedpublic void commit(boolean transaction)
commit in interface Commitabletransaction - true if this is a full transaction and
false if this is only a sub-transaction (a
nested scope with transaction support).public void rollback(boolean transaction)
Undoable interface has been already rolled back).
This notification can be used to implement cleanup of any custom
state that needs to be maintained in this case. It can also be used
to implement a rollback that is completely independent of the
Undoable (externally driven) interface.rollback in interface Commitabletransaction - true if this is a full transaction and
false if this is only a sub-transaction (a
nested scope with transaction support).public void validate(boolean transaction,
boolean aggressiveFlush)
throws ErrorConditionException
LEAVE, NEXT and
RETURN are also considered normal exits or iterations so
long as they were not preceded by an UNDO. Likewise, a
QUIT is a normal exit so long as it is not inside a block
that has an ON QUIT UNDO, <action>.validate in interface Commitabletransaction - true if this is a full transaction and
false if this is only a sub-transaction (a
nested scope with transaction support).aggressiveFlush - true if transaction manager is in aggressive subtransaction
flush mode, indicating that any transient buffers should be validated and
flushed, regardless of other state.ErrorConditionException - If validation fails.