【Java开源代码栏目提醒】:网学会员鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“TransactionParticipantIF.java”一文,供大家参考学习
/**
* This interface is implemented by objects that participate in
* transactions or by adapters that allow objects that don't
* implement this interface to particiate in transactions.
*/
public interface TransactionParticipantIF {
/**
* This method does not return until it can associate a
* lock on the particiating object with the current
* thread.
*/
public void lock() ;
/**
* Return an object that encapsulates the state of the
* participating object.
*/
public SnapshotIF captureState() ;
/**
* Restore the state of the participating object from the
* information encapsulated in the given object. The given
* object must have previously been returned by this
* object's captureState method.
*/
public void restoreState(SnapshotIF state) ;
/**
* Release a previously obtained lock.
*/
public void unlock() ;
} // interface TransactionParticipantIF