| |
|
| java.lang.Object java.lang.Thread helma.objectmodel.db.Transactor
Transactor | public class Transactor extends Thread (Code) | | A subclass of thread that keeps track of changed nodes and triggers
changes in the database when a transaction is commited.
|
Transactor | public Transactor(Runnable runnable, ThreadGroup group, NodeManager nmgr)(Code) | | Creates a new Transactor object.
Parameters: runnable - ... Parameters: group - ... Parameters: nmgr - ... |
abort | public synchronized void abort()(Code) | | Abort the current transaction, rolling back all changes made.
|
begin | public synchronized void begin(String name) throws Exception(Code) | | Start a new transaction with the given name.
Parameters: name - The name of the transaction. This is usually the requestpath for the underlying HTTP request. throws: Exception - ... |
closeConnections | public void closeConnections()(Code) | | Closes all open JDBC connections
|
commit | public synchronized void commit() throws Exception(Code) | | Commit the current transaction, persisting all changes to DB.
throws: Exception - ... |
dropCleanNode | public void dropCleanNode(Key key)(Code) | | Drop a reference to an unmodified Node previously registered with visitCleanNode().
Parameters: key - the key |
dropDirtyNode | public void dropDirtyNode(Node node)(Code) | | Unmark a Node that has previously been marked as modified during the transaction
Parameters: node - ... |
getCleanNode | public Node getCleanNode(Object key)(Code) | | Get a reference to an unmodified Node local to this transaction
Parameters: key - ... ... |
getConnection | public Connection getConnection(DbSource src)(Code) | | Get a db connection that was previously registered with this transactor thread.
Parameters: src - the db source the connection |
getDirtyNode | public Node getDirtyNode(Key key)(Code) | | Get a dirty Node from this transaction.
Parameters: key - the key the dirty node associated with the key, or null |
getTransactionName | public String getTransactionName()(Code) | | Return the name of the current transaction. This is usually the request
path for the underlying HTTP request.
|
isActive | public boolean isActive()(Code) | | Returns true if a transaction is currently active.
true if currently a transaction is active |
kill | public synchronized void kill()(Code) | | Kill this transaction thread. Used as last measure only.
|
registerConnection | public void registerConnection(DbSource src, Connection con)(Code) | | Register a db connection with this transactor thread.
Parameters: src - the db source Parameters: con - the connection |
toString | public String toString()(Code) | | Return a string representation of this Transactor thread
... |
visitCleanNode | public void visitCleanNode(Node node)(Code) | | Keep a reference to an unmodified Node local to this transaction
Parameters: node - the node to register |
visitCleanNode | public void visitCleanNode(Key key, Node node)(Code) | | Keep a reference to an unmodified Node local to this transaction
Parameters: key - the key to register with Parameters: node - the node to register |
visitDirtyNode | public void visitDirtyNode(Node node)(Code) | | Mark a Node as modified/created/deleted during this transaction
Parameters: node - ... |
visitParentNode | public void visitParentNode(Node node)(Code) | | Parameters: node - ... |
|
|
|