View Javadoc

1   package com.atlassian.sal.api.rdbms;
2   
3   import com.atlassian.annotations.PublicApi;
4   
5   /**
6    * Provided by the host application for creating {@link com.atlassian.sal.api.rdbms.TransactionalExecutor}.
7    * <p/>
8    * Note that the TransactionalExecutors created are not considered thread safe.
9    *
10   * @since 3.0
11   */
12  @PublicApi
13  public interface TransactionalExecutorFactory {
14      /**
15       * Create a transactional executor with <code>readOnly</code> set and <code>requiresNew</code> not set
16       */
17      TransactionalExecutor createExecutor();
18  
19      /**
20       * Create a transactional executor
21       *
22       * @param readOnly    initial value for <code>readOnly</code>
23       * @param requiresNew initial value for <code>requiresNew</code>
24       */
25      TransactionalExecutor createExecutor(boolean readOnly, boolean requiresNew);
26  }