Package org.fcrepo.kernel.impl
Class TransactionImpl
- java.lang.Object
-
- org.fcrepo.kernel.impl.TransactionImpl
-
- All Implemented Interfaces:
org.fcrepo.kernel.api.Transaction
public class TransactionImpl extends Object implements org.fcrepo.kernel.api.Transaction
The Fedora Transaction implementation- Author:
- mohideen
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTransactionImpl(String id, TransactionManagerImpl txManager, Duration sessionTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()voidcommitIfShortLived()voidexpire()InstantgetExpires()StringgetId()booleanhasExpired()booleanisCommitted()booleanisRolledBack()booleanisShortLived()voidlockResource(org.fcrepo.kernel.api.identifiers.FedoraId resourceId)voidrefresh()voidreleaseResourceLocksIfShortLived()voidrollback()voidsetBaseUri(String baseUri)voidsetShortLived(boolean shortLived)voidsetUserAgent(String userAgent)InstantupdateExpiry(Duration amountToAdd)
-
-
-
Constructor Detail
-
TransactionImpl
protected TransactionImpl(String id, TransactionManagerImpl txManager, Duration sessionTimeout)
-
-
Method Detail
-
commit
public void commit()
- Specified by:
commitin interfaceorg.fcrepo.kernel.api.Transaction
-
isCommitted
public boolean isCommitted()
- Specified by:
isCommittedin interfaceorg.fcrepo.kernel.api.Transaction
-
rollback
public void rollback()
- Specified by:
rollbackin interfaceorg.fcrepo.kernel.api.Transaction
-
isRolledBack
public boolean isRolledBack()
- Specified by:
isRolledBackin interfaceorg.fcrepo.kernel.api.Transaction
-
setShortLived
public void setShortLived(boolean shortLived)
- Specified by:
setShortLivedin interfaceorg.fcrepo.kernel.api.Transaction
-
isShortLived
public boolean isShortLived()
- Specified by:
isShortLivedin interfaceorg.fcrepo.kernel.api.Transaction
-
expire
public void expire()
- Specified by:
expirein interfaceorg.fcrepo.kernel.api.Transaction
-
hasExpired
public boolean hasExpired()
- Specified by:
hasExpiredin interfaceorg.fcrepo.kernel.api.Transaction
-
updateExpiry
public Instant updateExpiry(Duration amountToAdd)
- Specified by:
updateExpiryin interfaceorg.fcrepo.kernel.api.Transaction
-
getExpires
public Instant getExpires()
- Specified by:
getExpiresin interfaceorg.fcrepo.kernel.api.Transaction
-
commitIfShortLived
public void commitIfShortLived()
- Specified by:
commitIfShortLivedin interfaceorg.fcrepo.kernel.api.Transaction
-
refresh
public void refresh()
- Specified by:
refreshin interfaceorg.fcrepo.kernel.api.Transaction
-
lockResource
public void lockResource(org.fcrepo.kernel.api.identifiers.FedoraId resourceId)
- Specified by:
lockResourcein interfaceorg.fcrepo.kernel.api.Transaction
-
releaseResourceLocksIfShortLived
public void releaseResourceLocksIfShortLived()
- Specified by:
releaseResourceLocksIfShortLivedin interfaceorg.fcrepo.kernel.api.Transaction
-
setBaseUri
public void setBaseUri(String baseUri)
- Specified by:
setBaseUriin interfaceorg.fcrepo.kernel.api.Transaction
-
setUserAgent
public void setUserAgent(String userAgent)
- Specified by:
setUserAgentin interfaceorg.fcrepo.kernel.api.Transaction
-
-