KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > controller > requestmanager > TransactionMarkerMetaData


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: c-jdbc@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): _________________________.
23  */

24
25 package org.objectweb.cjdbc.controller.requestmanager;
26
27 /**
28  * This class carry transaction marker (begin/commit/rollback) metadata.
29  * <p>
30  * Metadata include a transaction id, a login and a timeout.
31  *
32  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
33  * @version 1.0
34  */

35 public class TransactionMarkerMetaData
36 {
37   private long transactionId;
38   private long timeout;
39   private String JavaDoc login;
40
41   /**
42    * Creates a new <code>TransactionMarkerMetaData</code>.
43    *
44    * @param transactionId the transaction identifier.
45    * @param timeout the transaction timeout in seconds.
46    * @param login the user login.
47    */

48   public TransactionMarkerMetaData(
49     long transactionId,
50     long timeout,
51     String JavaDoc login)
52   {
53     this.transactionId = transactionId;
54     this.timeout = timeout;
55     this.login = login;
56   }
57
58   /**
59    * Returns the login.
60    *
61    * @return String
62    */

63   public String JavaDoc getLogin()
64   {
65     return login;
66   }
67
68   /**
69    * Returns the timeout.
70    *
71    * @return long
72    */

73   public long getTimeout()
74   {
75     return timeout;
76   }
77
78   /**
79    * Returns the transactionId.
80    *
81    * @return int
82    */

83   public long getTransactionId()
84   {
85     return transactionId;
86   }
87
88   /**
89    * Sets the login.
90    *
91    * @param login the login to set.
92    */

93   public void setLogin(String JavaDoc login)
94   {
95     this.login = login;
96   }
97
98   /**
99    * Sets the timeout.
100    *
101    * @param timeout the timeout to set.
102    */

103   public void setTimeout(long timeout)
104   {
105     this.timeout = timeout;
106   }
107
108   /**
109    * Sets the transactionId.
110    *
111    * @param transactionId the transactionId to set
112    */

113   public void setTransactionId(long transactionId)
114   {
115     this.transactionId = transactionId;
116   }
117 }
118
Popular Tags