public class FailSafeTransactionImpl extends java.lang.Object implements FailSafeTransaction
Modifier | Constructor and Description |
---|---|
protected |
FailSafeTransactionImpl(java.io.File file)
Creates a new transaction.
|
Modifier and Type | Method and Description |
---|---|
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 transaction and cancels the changes.
|
protected FailSafeTransactionImpl(java.io.File file) throws java.lang.NullPointerException
file
- The file associated with this transactionjava.lang.NullPointerException
- if the file is nullpublic void restoreFile() throws java.lang.IllegalStateException, java.io.IOException
restoreFile
in interface FailSafeTransaction
java.lang.IllegalStateException
- if the file doesn't exists anymorejava.io.IOException
- if an IOException occurs during the file restorationpublic void beginTransaction() throws java.lang.IllegalStateException, java.io.IOException
beginTransaction
in interface FailSafeTransaction
java.lang.IllegalStateException
- if the file doesn't exists anymorejava.io.IOException
- if an IOException occurs during the transaction
creationpublic void commit() throws java.lang.IllegalStateException, java.io.IOException
commit
in interface FailSafeTransaction
java.lang.IllegalStateException
- if the file doesn't exists anymorejava.io.IOException
- if an IOException occurs during the operationpublic void rollback() throws java.lang.IllegalStateException, java.io.IOException
rollback
in interface FailSafeTransaction
java.lang.IllegalStateException
- if the file doesn't exists anymorejava.io.IOException
- if an IOException occurs during the operation
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.