|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.fileaccess.FailSafeTransactionImpl
public class FailSafeTransactionImpl
A failsafe transaction class. By failsafe we mean here that the file concerned always stays in a coherent state. This class use the transactional model.
| Constructor Summary | |
|---|---|
protected |
FailSafeTransactionImpl(File file)
Creates a new transaction. |
| Method Summary | |
|---|---|
void |
beginTransaction()
Begins a new transaction. |
void |
commit()
Closes the transaction and commit the changes. |
void |
restoreFile()
Ensure that the file accessed is in a coherent state. |
void |
rollback()
Closes the transation and cancel the changes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FailSafeTransactionImpl(File file)
throws NullPointerException
file - The file associated with this transaction
NullPointerException - if the file is null| Method Detail |
|---|
public void restoreFile()
throws IllegalStateException,
IOException
restoreFile in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymore
IOException - if an IOException occurs during the file restoration
public void beginTransaction()
throws IllegalStateException,
IOException
beginTransaction in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymore
IOException - if an IOException occurs during the transaction
creation
public void commit()
throws IllegalStateException,
IOException
commit in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymore
IOException - if an IOException occurs during the operation
public void rollback()
throws IllegalStateException,
IOException
rollback in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymore
IOException - if an IOException occurs during the operation
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||