Db4o Databases Replication

db4o-to-db4o replication is the simplest replication and is supported by both java and .NET versions.

In the following examples we will use Pilot class from the db4o documentation

 

 

Pilot.cs
01/* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com */ 02 03namespace Db4objects.Db4odoc.Replication 04{ 05 public class Pilot 06 { 07 private string _name; 08 09 public Pilot() 10 { 11 _name = ""; 12 } 13 14 public Pilot(string name) 15 { 16 _name = name; 17 } 18 19 public string Name 20 { 21 get 22 { 23 return _name; 24 } 25 set 26 { 27 _name = value; 28 } 29 } 30 override public string ToString() 31 { 32 return _name; 33 } 34 } 35}

 

Pilot.vb
01' Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com 02Namespace Db4objects.Db4odoc.Replicating 03 Public Class Pilot 04 Private _name As String 05 06 Public Sub New(ByVal name As String) 07 Me._name = name 08 End Sub 09 10 Public Property Name() As String 11 Get 12 Return _name 13 End Get 14 Set(ByVal Value As String) 15 _name = Value 16 End Set 17 End Property 18 19 Public Overrides Function ToString() As String 20 Return _name 21 End Function 22 End Class 23End Namespace