@@ -0,0 +1,2240 @@
+/*%0A * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.%0A *%0A * Distributable under LGPL license.%0A * See terms of license at gnu.org.%0A */%0Apackage net.java.sip.communicator.service.fileaccess;%0A%0Aimport java.io.*;%0A%0A/**%0A * A failsafe transaction interface. By failsafe we mean here that the file%0A * concerned always stays in a coherent state.%0A * %0A * @author Benoit Pradelle%0A */%0Apublic interface FailSafeTransaction %7B%0A    /**%0A     * Ensure that the file accessed is in a coherent state. This function is%0A     * useful to do a failsafe read without starting a transaction.%0A     * %0A     * @throws IllegalStateException if the file doesn't exists anymore%0A     * @throws IOException if an IOException occurs during the file restoration%0A     */%0A    public void restoreFile()%0A        throws IllegalStateException, IOException;%0A    %0A    /**%0A     * Begins a new transaction. If a transaction is already active, commits the%0A     * changes and begin a new transaction.%0A     * A transaction can be closed by a commit or rollback operation.%0A     * When the transaction begins, the file is restored to a coherent state if%0A     * needed.%0A     * %0A     * @return The fail-safe file in which every modification must be done.%0A     * %0A     * @throws IllegalStateException if the file doesn't exists anymore%0A     * @throws IOException if an IOException occurs during the transaction%0A     * creation%0A     */%0A    public void beginTransaction() %0A        throws IllegalStateException, IOException;%0A    %0A    /**%0A     * Closes the transaction and commit the changes. Everything written in the%0A     * file during the transaction is saved.%0A     * %0A     * @throws IllegalStateException if the file doesn't exists anymore%0A     * @throws IOException if an IOException occurs during the operation%0A     */%0A    public void commit()%0A        throws IllegalStateException, IOException;%0A    %0A    /**%0A     * Closes the transation and cancel the changes. Everything written in the %0A     * file during the transaction is NOT saved.%0A     * @throws IllegalStateException if the file doesn't exists anymore%0A     * @throws IOException if an IOException occurs during the operation%0A     */%0A    public void rollback()%0A        throws IllegalStateException, IOException;%0A%7D%0A

Add FailSafeTransaction interface to the repo.