public class FailSafeTransactionImpl extends Object implements FailSafeTransaction
| Modifier | Constructor and Description |
|---|---|
protected |
FailSafeTransactionImpl(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(File file) throws NullPointerException
file - The file associated with this transactionNullPointerException - if the file is nullpublic void restoreFile()
throws IllegalStateException,
IOException
restoreFile in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymoreIOException - if an IOException occurs during the file restorationpublic void beginTransaction()
throws IllegalStateException,
IOException
beginTransaction in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymoreIOException - if an IOException occurs during the transaction
creationpublic void commit()
throws IllegalStateException
commit in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymorepublic void rollback()
throws IllegalStateException,
IOException
rollback in interface FailSafeTransactionIllegalStateException - if the file doesn't exists anymoreIOException - if an IOException occurs during the operationCopyright © 2021 jitsi.org. All rights reserved.