| |
|
| java.lang.Object org.apache.commons.transaction.memory.TransactionalMapWrapper
All known Subclasses: org.apache.commons.transaction.memory.PessimisticMapWrapper, org.apache.commons.transaction.memory.OptimisticMapWrapper,
Inner Class :protected static class HashEntry implements Map.Entry | |
Inner Class :public class TxContext | |
mapFactory | protected MapFactory mapFactory(Code) | | Factory to be used to create temporary maps for transactions.
|
setFactory | protected SetFactory setFactory(Code) | | Factory to be used to create temporary sets for transactions.
|
wrapped | protected Map wrapped(Code) | | The map wrapped.
|
TransactionalMapWrapper | public TransactionalMapWrapper(Map wrapped)(Code) | | Creates a new transactional map wrapper. Temporary maps and sets to store transactional
data will be instances of
java.util.HashMap and
java.util.HashSet .
Parameters: wrapped - map to be wrapped |
TransactionalMapWrapper | public TransactionalMapWrapper(Map wrapped, MapFactory mapFactory, SetFactory setFactory)(Code) | | Creates a new transactional map wrapper. Temporary maps and sets to store transactional
data will be created and disposed using
MapFactory and
SetFactory .
Parameters: wrapped - map to be wrapped Parameters: mapFactory - factory for temporary maps Parameters: setFactory - factory for temporary sets |
getActiveTx | protected TxContext getActiveTx()(Code) | | |
getTransactionState | public int getTransactionState()(Code) | | Returns the state of the current transaction.
state of the current transaction as decribed in the Status interface. |
isReadOnly | public boolean isReadOnly()(Code) | | Checks if any write operations have been performed inside this transaction.
true if no write opertation has been performed inside the current transaction,false otherwise |
isTransactionMarkedForRollback | public boolean isTransactionMarkedForRollback()(Code) | | Checks whether this transaction has been marked to allow a rollback as the only
valid outcome. This can be set my method
TransactionalMapWrapper.markTransactionForRollback() or might
be set internally be any fatal error. Once a transaction is marked for rollback there
is no way to undo this. A transaction that is marked for rollback can not be committed,
also rolled back.
true if this transaction has been marked for a roll back See Also: TransactionalMapWrapper.markTransactionForRollback() |
setActiveTx | protected void setActiveTx(TxContext txContext)(Code) | | |
suspendTransaction | public TxContext suspendTransaction()(Code) | | Suspends the transaction associated to the current thread. I.e. the associated between the
current thread and the transaction is deleted. This is useful when you want to continue the transaction
in another thread later. Call
TransactionalMapWrapper.resumeTransaction(TxContext) - possibly in another thread than the current -
to resume work on the transaction.
Caution: When calling this method the returned identifier
for the transaction is the only remaining reference to the transaction, so be sure to remember it or
the transaction will be eventually deleted (and thereby rolled back) as garbage.
an identifier for the suspended transaction, will be needed to later resume the transaction byTransactionalMapWrapper.resumeTransaction(TxContext) See Also: TransactionalMapWrapper.resumeTransaction(TxContext) |
|
|
|