KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > taskman > transaction > Transaction


1 package org.sapia.taskman.transaction;
2
3 /**
4  * This interface specifies a "transaction": a set of <code>Task</code> s that
5  * are part of a given unit of work.
6  *
7  * @author Yanick Duchesne
8  *
9  * <dl>
10  * <dt><b>Copyright: </b>
11  * <dd>Copyright &#169; 2002-2004 <a HREF="http://www.sapia-oss.org">Sapia Open
12  * Source Software </a>. All Rights Reserved.</dd>
13  * </dt>
14  * <dt><b>License: </b>
15  * <dd>Read the license.txt file of the jar or visit the <a
16  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the Sapia
17  * OSS web site</dd>
18  * </dt>
19  * </dl>
20  */

21 public interface Transaction {
22   public static final int STATUS_INITIAL = 0;
23   public static final int STATUS_COMMITTING = 1;
24   public static final int STATUS_COMMITTED = 2;
25
26   /**
27    * Commits this instance (the set of tasks that are "part" of this transaction
28    * are thereafter executed.
29    */

30   public void commit();
31
32   /**
33    * @return this instance's status.
34    * @see #STATUS_INITIAL
35    * @see #STATUS_COMMITTING
36    * @see #STATUS_COMMITTED
37    */

38   public int getStatus();
39   
40   /**
41    * @return the <code>Object</code> that is the unique identifier of this transaction√©
42    */

43   public Object JavaDoc getId();
44 }
45
Popular Tags