Package org.biojava.utils
Interface Commitable
-
- All Known Implementing Classes:
FileAsList
public interface Commitable
Implementations ofCommitablesupport atomic changes from one known state to another via commit/rollback semantics.- Since:
- 1.3
- Author:
- Matthew Pocock, Keith James
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommit()commitcommits pending changes.voidrollback()rollbackreverses pending changes to restore initial (or prior commit) state.
-
-
-
Method Detail
-
commit
void commit() throws CommitFailure
commitcommits pending changes.- Throws:
CommitFailure- if an error occurs
-
rollback
void rollback()
rollbackreverses pending changes to restore initial (or prior commit) state. This always succededs or raises an unchecked exception. If the rollback fails, you must raise an AssertionFailure.
-
-