KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > recoverylog > CheckpointLogEntry


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2006 Continuent, Inc.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Emmanuel Cecchet.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.controller.recoverylog;
23
24 import java.io.Serializable JavaDoc;
25
26 /**
27  * This class defines a CheckpointLogEntry used to carry information about the
28  * log entry pointed by a checkpoint
29  *
30  * @author <a HREF="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
31  * @version 1.0
32  */

33 public class CheckpointLogEntry implements Serializable JavaDoc
34 {
35   private static final long serialVersionUID = 755365554583076662L;
36
37   private String JavaDoc sql;
38   private String JavaDoc vLogin;
39   private String JavaDoc autoConnTran;
40   private long transactionId;
41   private long requestId;
42
43   /**
44    * Creates a new <code>CheckpointLogEntry</code> object
45    *
46    * @param sql sql statement
47    * @param login virtual login
48    * @param autoConnTran 'A', 'T' or 'C'
49    * @param transactionId transaction id
50    * @param requestId request id
51    */

52   public CheckpointLogEntry(String JavaDoc sql, String JavaDoc login, String JavaDoc autoConnTran,
53       long transactionId, long requestId)
54   {
55     this.autoConnTran = autoConnTran;
56     this.requestId = requestId;
57     this.sql = sql;
58     this.transactionId = transactionId;
59     this.vLogin = login;
60   }
61
62   /**
63    * Returns the autoConnTran value.
64    *
65    * @return Returns the autoConnTran.
66    */

67   public final String JavaDoc getAutoConnTran()
68   {
69     return autoConnTran;
70   }
71
72   /**
73    * Returns the requestId value.
74    *
75    * @return Returns the requestId.
76    */

77   public final long getRequestId()
78   {
79     return requestId;
80   }
81
82   /**
83    * Returns the sql value.
84    *
85    * @return Returns the sql.
86    */

87   public final String JavaDoc getSql()
88   {
89     return sql;
90   }
91
92   /**
93    * Returns the transactionId value.
94    *
95    * @return Returns the transactionId.
96    */

97   public final long getTransactionId()
98   {
99     return transactionId;
100   }
101
102   /**
103    * Returns the vLogin value.
104    *
105    * @return Returns the vLogin.
106    */

107   public final String JavaDoc getVLogin()
108   {
109     return vLogin;
110   }
111
112   /**
113    * @see java.lang.Object#toString()
114    */

115   public String JavaDoc toString()
116   {
117     return "Checkpoint log entry (" + autoConnTran + ") transactionId:"
118         + transactionId + " requestId:" + requestId + " vlogin:" + vLogin
119         + " sql:" + sql;
120   }
121
122 }
123
Popular Tags