001package co.codewizards.cloudstore.core.repo.local;
002
003public interface LocalRepoTransactionListener {
004
005        int getPriority();
006
007        LocalRepoTransaction getTransaction();
008
009        void setTransaction(LocalRepoTransaction transaction);
010
011        /**
012         * Notifies this instance about the {@linkplain #getTransaction() transaction} being begun.
013         * @see #onCommit()
014         * @see #onRollback()
015         */
016        void onBegin();
017
018        /**
019         * Notifies this instance about the {@linkplain #getTransaction() transaction} being committed.
020         * @see #onBegin()
021         * @see #onRollback()
022         */
023        void onCommit();
024
025        /**
026         * Notifies this instance about the {@linkplain #getTransaction() transaction} being rolled back.
027         * @see #onBegin()
028         * @see #onCommit()
029         */
030        void onRollback();
031
032}