KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > controller > virtualdatabase > protocol > ReplicateLogEntries


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2005 Emic Networks.
4  * Contact: c-jdbc@objectweb.org
5  *
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): Olivier Fambon.
22  * Contributor(s): ______________________.
23  */

24
25 package org.objectweb.cjdbc.controller.virtualdatabase.protocol;
26
27 import java.io.Serializable JavaDoc;
28
29 /**
30  * This message is used both to prepare the sending of a set of log entries to a
31  * remote controller's vdb recovery log (intialization) and to terminate it
32  * (termination). Initialization is the second step of the process to rebuild
33  * the remote recovery log from a live one, termination is the final step of the
34  * process. The process is as such so that eventually the remote vdb backends
35  * can be restored from dumps. Upon reception of this message for the
36  * initialisation phase (identified by a null dumpCheckpointName), the remote
37  * recovery log is cleared from the beginning upto the 'now' checkpoint.
38  * Subsequently, CopyLogEntry messages are sent and log entries are inserted 'as
39  * are' into the remote recovery log. Then, upon reception of this message for
40  * the termination phase (non-null dumpCheckpointName), the remote recovery log
41  * makes the dumpCheckpointName available for restore operations.
42  *
43  * @see CopyLogEntry
44  * @author <a HREF="mailto:Olivier.Fambon@emicnetworks.com>Olivier Fambon </a>
45  * @version 1.0
46  */

47 public class ReplicateLogEntries implements Serializable JavaDoc
48 {
49   private static final long serialVersionUID = -2813776509468770586L;
50
51   private String JavaDoc checkpointName;
52   private String JavaDoc dumpCheckpointName;
53   private long checkpointId;
54
55   /**
56    * Creates a new <code>ReplicateLogEntries</code> message
57    *
58    * @param checkpointName The checkpoint (aka now checkpoint) before wich
59    * entries are to be replaced.
60    * @param checkpointId The id associated to checkpoint THIS ID SHOULD BE
61    * HIDDEN
62    * @param dumpCheckpointName The dump checkoint from wich entries are to be
63    * replaced.
64    */

65   public ReplicateLogEntries(String JavaDoc checkpointName, String JavaDoc dumpCheckpointName,
66       long checkpointId)
67   {
68     this.dumpCheckpointName = dumpCheckpointName;
69     this.checkpointName = checkpointName;
70     this.checkpointId = checkpointId;
71   }
72
73   /**
74    * Returns the checkpointName value.
75    *
76    * @return Returns the 'now' checkpointName.
77    */

78   public String JavaDoc getCheckpointName()
79   {
80     return checkpointName;
81   }
82
83   /**
84    * Returns the dump checkpoint name .
85    *
86    * @return Returns the dump CheckpointName.
87    */

88   public String JavaDoc getDumpCheckpointName()
89   {
90     return dumpCheckpointName;
91   }
92
93   /**
94    * Returns the Checkpoint id.
95    *
96    * @return the Checkpoint id
97    */

98   public long getCheckpointId()
99   {
100     return checkpointId;
101   }
102 }
Popular Tags