KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.objectweb.cjdbc.common.shared.DumpInfo;
30 import org.objectweb.cjdbc.controller.backup.DumpTransferInfo;
31
32 /**
33  * This message is used to prepare the sending of a dump to a remote
34  * controller's vdb backup manager. This is used as an integrated remote-copy
35  * facility in the occurence of restore, e.g. after a rebuild of the remote
36  * recovery log from a live one. Upon reception of this message, the remote
37  * backup manager initiates a transfer onto the sending controller's backuper.
38  *
39  * @author <a HREF="mailto:Olivier.Fambon@emicnetworks.com>Olivier Fambon </a>
40  * @version 1.0
41  */

42 public class InitiateDumpCopy implements Serializable JavaDoc
43 {
44   private static final long serialVersionUID = 4674422809133556752L;
45
46   private DumpInfo dumpInfo;
47   private DumpTransferInfo dumpTransferInfo;
48
49   // private int timeout;
50

51   /**
52    * Creates a new <code>ReplicateLogEntries</code> message
53    *
54    * @param dumpInfo The DumpInfo object returned by the Backuper.
55    * @param dumpTransferInfo The dump transfer information
56    */

57   public InitiateDumpCopy(DumpInfo dumpInfo, DumpTransferInfo dumpTransferInfo)
58   {
59     this.dumpInfo = dumpInfo;
60     this.dumpTransferInfo = dumpTransferInfo;
61   }
62
63   /**
64    * Returns the dump info (name, checkpoint, etc).
65    *
66    * @return Returns the dump info (on the sending side).
67    */

68   public DumpInfo getDumpInfo()
69   {
70     return dumpInfo;
71   }
72
73   /**
74    * Returns the dump checkpoint name (global).
75    *
76    * @return Returns the dump CheckpointName.
77    */

78   public String JavaDoc getDumpCheckpointName()
79   {
80     return dumpInfo.getCheckpointName();
81   }
82
83   /**
84    * Return the dump name (sending side).
85    *
86    * @return the dump name (sending side).
87    */

88   public String JavaDoc getDumpName()
89   {
90     return dumpInfo.getDumpName();
91   }
92
93   /**
94    * Returns the session key to be used to authenticate the destination on the
95    * sender.
96    *
97    * @return the session key
98    */

99   public DumpTransferInfo getDumpTransferInfo()
100   {
101     return dumpTransferInfo;
102   }
103
104 }
Popular Tags