KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2005 EmicNetworks.
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): Olivier Fambon.
21  * Contributor(s): ______________________.
22  */

23
24 package org.objectweb.cjdbc.controller.virtualdatabase.protocol;
25
26 import java.io.Serializable JavaDoc;
27
28 import org.objectweb.cjdbc.controller.recoverylog.events.LogEntry;
29
30 /**
31  * This class defines a CopyLogEntry message. It is used to send recovery log
32  * entries over to a remote peer. Entries are sent one by one instead of as big
33  * bunch because each log entry can potentially be a huge object, e.g. if it
34  * contains a blob, and it should fit in memory.
35  *
36  * @author <a HREF="mailto:olivier.fambon@emicnetworks.com">Olivier Fambon </a>
37  * @version 1.0
38  */

39 public class CopyLogEntry implements Serializable JavaDoc
40 {
41   private static final long serialVersionUID = 1L;
42
43   private LogEntry entry;
44
45   /**
46    * Creates a new <code>CopyLogEntry</code> object
47    *
48    * @param entry the entry to be sent over to the remote peer.
49    */

50   public CopyLogEntry(LogEntry entry)
51   {
52     this.entry = entry;
53   }
54
55   /**
56    * Returns the recovery LogEntry to be copied.
57    *
58    * @return the entry
59    */

60   public LogEntry getEntry()
61   {
62     return entry;
63   }
64 }
65
Popular Tags