public abstract class DatabaseActionTXPNode extends AbstractActionActorTXPNode<DatabaseActionActor.Settings>
ITXPNode.State
hasProcessTimedOut, hasTimedOut, hasTimedOutWaiting, pid, process, state, timeout, timeoutTask, txplog
Constructor and Description |
---|
DatabaseActionTXPNode(VSActionTXProcess actionProcess,
DatabaseActionActor.Settings settings,
IDBConnectionPool pool)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ITXPNode.State |
begin(ITXProcess process,
ITXPid pid)
Notifies the node it got associated with a transactional process.
|
ITXPNode.State |
commit(ITXProcess process)
Instructs the node to commit the work.
|
protected void |
commitReadOnly()
Commits the local transaction after read only work.
|
void |
forget(ITXProcess process)
Notifies the node it got disassociated from the process ie it can abort,
rollback (if needed) and forget about the process.
|
protected Connection |
getConnection()
Returns the connection.
|
protected void |
onCleanup()
Cleans up: releases back the connection to the pool.
|
ITXPNode.State |
rollback(ITXProcess process)
Instructs the node to roll back the work.
|
protected void |
setState(ITXPNode.State state)
Sets the current state of the node.
|
assignSettings, cleanUp, createLogger, execute, executeAction, getAction, getActionProcess, getLoggerInfo, getSettings, getVirtualSpace, prepare, prepareAction
cancelTimeout, getPid, getProcess, getState, getTimeout, hasProcessTimedOut, hasTimedOut, hasTimedOutWaiting, isIdempotent, log, onTimeout, processTimeout, ready, recover, retry, setTimeout, timeout, undo
public DatabaseActionTXPNode(VSActionTXProcess actionProcess, DatabaseActionActor.Settings settings, IDBConnectionPool pool)
actionProcess
- The action process.settings
- Database action actor settings for transaction.pool
- The Connection pool.public ITXPNode.State begin(ITXProcess process, ITXPid pid)
ITXPNode
ITXPNode.State.WORKING
or ITXPNode.State.FAILED
depending on its state.process
- the processpid
- the pid for this node of the processprotected Connection getConnection()
public void forget(ITXProcess process)
forget
in interface ITXPNode
forget
in class AbstractActionActorTXPNode<DatabaseActionActor.Settings>
process
- The process.public ITXPNode.State commit(ITXProcess process)
ITXPNode
ITXPNode.State.COMPLETED
or ITXPNode.State.FAILED
depending on its
state. If a commit failed the node is expected to have rolled back the
work.process
- the processpublic ITXPNode.State rollback(ITXProcess process)
ITXPNode
ITXPNode.State.COMPLETED
or ITXPNode.State.FAILED
depending on
its state. NOTE if the node failed its work it is already rolled back and
will return ITXPNode.State.COMPLETED
but remain in state.
ITXPNode.State.FAILED
process
- the processprotected void setState(ITXPNode.State state)
setState
in class AbstractActionActorTXPNode<DatabaseActionActor.Settings>
state
- The state to set.protected void commitReadOnly()
protected void onCleanup()
onCleanup
in class AbstractActionActorTXPNode<DatabaseActionActor.Settings>
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.