KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > controller > recoverylog > events > LogEntry


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

23
24 package org.objectweb.cjdbc.controller.recoverylog.events;
25
26 import java.io.Serializable JavaDoc;
27
28 /**
29  * This class defines a recovery log entry that needs to be stored in the
30  * recovery database. This is also sent over the wire between controllers, when
31  * copying recovery log entries to a remote controller (copyLogFromCheckpoint).
32  *
33  * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet
34  * </a>
35  * @version 1.0
36  */

37 public class LogEntry implements Serializable JavaDoc
38 {
39   private static final long serialVersionUID = 1363084035201225164L;
40
41   private long tid;
42   private String JavaDoc query;
43   private String JavaDoc login;
44   private long id;
45   private boolean escapeProcessing;
46
47   /**
48    * Create a log object.
49    *
50    * @param id unique request id
51    * @param login login used for this request
52    * @param query query to log
53    * @param tid transaction id of this request
54    * @param escapeProcessing true if escape processing must be done
55    */

56   public LogEntry(long id, String JavaDoc login, String JavaDoc query, long tid,
57       boolean escapeProcessing)
58   {
59     this.id = id;
60     this.login = login;
61     this.query = query;
62     this.tid = tid;
63     this.escapeProcessing = escapeProcessing;
64   }
65
66   /**
67    * @return the request id
68    */

69   public long getId()
70   {
71     return id;
72   }
73
74   /**
75    * @return the login used for this request
76    */

77   public String JavaDoc getLogin()
78   {
79     return login;
80   }
81
82   /**
83    * @return the request itself
84    */

85   public String JavaDoc getQuery()
86   {
87     return query;
88   }
89
90   /**
91    * @return the transaction id
92    */

93   public long getTid()
94   {
95     return tid;
96   }
97
98   /**
99    * @return true if escape processing is needed
100    */

101   public boolean getEscapeProcessing()
102   {
103     return escapeProcessing;
104   }
105
106 }
Popular Tags