1 package com.atlassian.activeobjects.spi;
2
3 public interface TransactionSynchronisationManager {
4 /**
5 * Add an action to run if the encompassing transaction is rolled back
6 *
7 * @param callback - the action to run
8 * @return true if it has been added to an encompassing transaction,
9 * false if there was no transaction to synchronise with
10 */
11 public boolean runOnRollBack(Runnable callback);
12
13 /**
14 * Add an action to run if the encompassing transaction is successfully committed
15 *
16 * @param callback - the action to run
17 * @return true if it has been added to an encompassing transaction,
18 * false if there was no transaction to synchronise with
19 */
20 public boolean runOnSuccessfulCommit(Runnable callback);
21
22 /**
23 * @return true if there is a current active transaction
24 * @since 0.24
25 */
26 public boolean isActiveSynchronisedTransaction();
27 }