Class TxnResourceApiSerializable
java.lang.Object
org.aksw.commons.txn.impl.TxnResourceApiReadUncommitted<TxnSerializable>
org.aksw.commons.txn.impl.TxnResourceApiSerializable
- All Implemented Interfaces:
TxnResourceApi, TxnComponent
Api to a resource w.r.t. a transaction.
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Pathprotected ResourceLock<String> protected ReadWriteLockWithOwnershipFields inherited from class TxnResourceApiReadUncommitted
fileSync, resFileAbsPath, resFilePath, resKey, txn -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeclare that the txn accessed the resource.voidbooleanWhether the resource is visible to the transactionvoidRemove access declaration from the txn to this resource.Methods inherited from class TxnResourceApiReadUncommitted
finalizeCommit, getFileSync, getLastModifiedDate, getResourceKey, preCommit, putContent, rollbackMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TxnResourceApi
lock, unlock
-
Field Details
-
journalEntryFile
-
resourceLock
-
txnResourceLock
-
accessCache
-
-
Constructor Details
-
TxnResourceApiSerializable
-
-
Method Details
-
getTxnResourceLock
- Specified by:
getTxnResourceLockin interfaceTxnResourceApi- Overrides:
getTxnResourceLockin classTxnResourceApiReadUncommitted<TxnSerializable>
-
isVisible
public boolean isVisible()Description copied from interface:TxnResourceApiWhether the resource is visible to the transaction- Specified by:
isVisiblein interfaceTxnResourceApi- Overrides:
isVisiblein classTxnResourceApiReadUncommitted<TxnSerializable>
-
declareAccess
public void declareAccess()Description copied from interface:TxnResourceApiDeclare that the txn accessed the resource. Upon recovery the resource will be checked for any uncommitted changes.- Specified by:
declareAccessin interfaceTxnResourceApi- Overrides:
declareAccessin classTxnResourceApiReadUncommitted<TxnSerializable>
-
declareAccessCore
public void declareAccessCore() -
undeclareAccess
public void undeclareAccess()Description copied from interface:TxnResourceApiRemove access declaration from the txn to this resource. Recovery related to this txn will not consider the resource.- Specified by:
undeclareAccessin interfaceTxnResourceApi- Overrides:
undeclareAccessin classTxnResourceApiReadUncommitted<TxnSerializable>
-