public class TransactionManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TransactionManager.Exists
NO: The node does not exists yet, but will be created on commit
YES: The node already existed befor the transaction started.
|
| Modifier and Type | Field and Description |
|---|---|
static TransactionManager |
instance |
protected Map<String,Collection<MMObjectNode>> |
transactions |
| Modifier and Type | Method and Description |
|---|---|
String |
addNode(String transactionName,
String owner,
String tmpnumber) |
String |
cancel(Object user,
String transactionName) |
String |
commit(Object user,
String transactionName) |
Collection<MMObjectNode> |
createTransaction(String transactionName)
Creates transaction with given name.
|
String |
deleteObject(String transactionName,
String owner,
String tmpnumber) |
protected Collection<MMObjectNode> |
deleteTransaction(String transactionName)
Removes the transaction with given name
|
String |
findUserName(Object user) |
static TransactionManager |
getInstance() |
TemporaryNodeManager |
getTemporaryNodeManager() |
Collection<MMObjectNode> |
getTransaction(String transactionName)
Returns transaction with given name.
|
Map<String,Collection<MMObjectNode>> |
getTransactions()
Return a an unmodifable Map with all transactions.
|
(package private) boolean |
performCommits(Object user,
Collection<MMObjectNode> nodes) |
String |
removeNode(String transactionName,
String owner,
String tmpnumber) |
boolean |
resolve(String transactionName) |
protected final Map<String,Collection<MMObjectNode>> transactions
public static TransactionManager instance
public static TransactionManager getInstance()
public TemporaryNodeManager getTemporaryNodeManager()
public Collection<MMObjectNode> getTransaction(String transactionName) throws TransactionManagerException
transactionName - The name of the transaction to returnMMObjectNodes).TransactionManagerException - if the transaction with given name does not existpublic Map<String,Collection<MMObjectNode>> getTransactions()
public Collection<MMObjectNode> createTransaction(String transactionName) throws TransactionManagerException
transactionName - The name of the transaction to returnTransactionManagerException - if the transaction with given name existed alreadyprotected Collection<MMObjectNode> deleteTransaction(String transactionName)
null if no transaction with this name existedpublic String addNode(String transactionName, String owner, String tmpnumber) throws TransactionManagerException
TransactionManagerExceptionpublic String removeNode(String transactionName, String owner, String tmpnumber) throws TransactionManagerException
TransactionManagerExceptionpublic String deleteObject(String transactionName, String owner, String tmpnumber) throws TransactionManagerException
TransactionManagerExceptionpublic String cancel(Object user, String transactionName) throws TransactionManagerException
TransactionManagerExceptionpublic boolean resolve(String transactionName) throws TransactionManagerException
TransactionManagerExceptionpublic String commit(Object user, String transactionName) throws TransactionManagerException
TransactionManagerExceptionboolean performCommits(Object user, Collection<MMObjectNode> nodes)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}