public final class TransactionImpl extends RepositoryCache implements Transaction
TransactionTransaction.Status| Constructor and Description |
|---|
TransactionImpl(String id) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Map<Resource,Transaction.Status> |
getChangeSet()
|
String |
getId()
Returns the identifier of the
Transaction (unique for each Repository |
UUID |
getRepositoryId()
|
int |
hashCode() |
void |
invalidate()
After
Repository.commit(Transaction, String) or Repository.rollback(Transaction) the Transaction is invalidated
For internal usage only. |
boolean |
isActive()
Determines whether the
Transaction can still be used. |
boolean |
isChangeSetEmpty()
Whether there are any
Resources that are affected by the Transaction |
boolean |
register(Resource resource,
Transaction.Status status)
Tell the
Transaction the specified Resource will be affected during Repository.commit(Transaction, String)
For internal usage only. |
Transaction.Status |
status(Resource resource) |
String |
toString() |
clear, contains, get, getConcreteRevision, getRepository, isEmpty, put, putAll, setRepositorypublic TransactionImpl(String id)
public Map<Resource,Transaction.Status> getChangeSet()
TransactiongetChangeSet in interface TransactionMap of Resources and their Transaction.Statuspublic String getId()
TransactionTransaction (unique for each RepositorygetId in interface TransactionTransactionpublic UUID getRepositoryId()
TransactiongetRepositoryId in interface TransactionUUID of the Repositorypublic void invalidate()
TransactionRepository.commit(Transaction, String) or Repository.rollback(Transaction) the Transaction is invalidated
For internal usage only. Use Repository.commit(Transaction, String) or Repository.rollback(Transaction) insteadinvalidate in interface Transactionpublic boolean isActive()
TransactionTransaction can still be used. It cannot be used after Repository.commit(Transaction, String) or Repository.rollback(Transaction) where calledisActive in interface Transactiontrue if the Transaction can still be used otherwise falsepublic boolean isChangeSetEmpty()
TransactionResources that are affected by the TransactionisChangeSetEmpty in interface Transactiontrue if there are no Resources affected by the Transaction, otherwise falsepublic boolean register(Resource resource, Transaction.Status status)
TransactionTransaction the specified Resource will be affected during Repository.commit(Transaction, String)
For internal usage only. Use the methods from Repository insteadregister in interface Transactionresource - Resource to register to the Transactionstatus - Transaction.Status of the registered Resourcetrue if the registration modified the change set, otherwise false@CheckForNull public Transaction.Status status(Resource resource)
status in class RepositoryCacheCopyright © 2013–2014 shadowhunt. All rights reserved.