Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-22 08:22:07 +0000
committerEike Stepper2010-09-22 08:22:07 +0000
commit5dbb47549b1e46b1a49e35d242d6d847b0e48139 (patch)
tree5b7a437ab7126938a1e9a30bc1862ab8b1a411d5
parent4b6e0c127bf8fff569460c78c13273a7c4056539 (diff)
downloadcdo-5dbb47549b1e46b1a49e35d242d6d847b0e48139.tar.gz
cdo-5dbb47549b1e46b1a49e35d242d6d847b0e48139.tar.xz
cdo-5dbb47549b1e46b1a49e35d242d6d847b0e48139.zip
[325928] Provide FailoverMonitor server and FailoverAgents to coordinate fail-over scenarios
https://bugs.eclipse.org/bugs/show_bug.cgi?id=325928
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/CDONet4jServerUtil.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverAgent.java (renamed from plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverAgent.java)2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverMonitor.java (renamed from plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverMonitor.java)2
5 files changed, 8 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
index acc933ce81..6875cd129f 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
@@ -404,6 +404,8 @@ public abstract class FailoverExample
{
public static final String REPOSITORY_MONITOR_GROUP = "ExampleGroup";
+ public static final int REPOSITORY_MONITOR_PORT = 2038;
+
protected String host;
public Monitored(String host, int port, String name)
@@ -435,7 +437,7 @@ public abstract class FailoverExample
}
};
- agent.setMonitorConnector(createConnector("localhost:2038"));
+ agent.setMonitorConnector(createConnector("localhost:" + REPOSITORY_MONITOR_PORT));
agent.setConnectorDescription(host + ":" + port);
agent.setRepository(repository);
agent.setGroup(REPOSITORY_MONITOR_GROUP);
@@ -476,8 +478,8 @@ public abstract class FailoverExample
System.out.println(event + " agent " + format(agent));
for (Entry<Protocol, Pair<String, String>> entry : monitor.getAgents().entrySet())
{
- System.out.println(" " + (entry.getKey() == monitor.getMasterAgent() ? "MASTER: " : "BACKUP: ")
- + format(entry.getValue()));
+ String type = entry.getKey() == monitor.getMasterAgent() ? "MASTER: " : "BACKUP: ";
+ System.out.println(" " + type + format(entry.getValue()));
}
}
@@ -487,7 +489,7 @@ public abstract class FailoverExample
}
});
- container.getElement("org.eclipse.net4j.acceptors", TRANSPORT_TYPE, "0.0.0.0:2038");
+ container.getElement("org.eclipse.net4j.acceptors", TRANSPORT_TYPE, "0.0.0.0:" + REPOSITORY_MONITOR_PORT);
System.out.println("Monitoring...");
for (;;)
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
index 9d35b1fa40..77d28f4ccd 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
@@ -14,5 +14,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)";resoluti
org.eclipse.net4j;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.server.internal.net4j.bundle;version="4.0.0";x-internal:=true,
org.eclipse.emf.cdo.server.internal.net4j.protocol;version="4.0.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.server.internal.net4j.syncing;version="4.0.0",
org.eclipse.emf.cdo.server.net4j;version="4.0.0"
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/CDONet4jServerUtil.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/CDONet4jServerUtil.java
index c1b894dd29..86dcba62e8 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/CDONet4jServerUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/CDONet4jServerUtil.java
@@ -12,7 +12,6 @@ package org.eclipse.emf.cdo.server.net4j;
import org.eclipse.emf.cdo.server.IRepositoryProvider;
import org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerProtocolFactory;
-import org.eclipse.emf.cdo.server.internal.net4j.syncing.FailoverMonitor;
import org.eclipse.emf.cdo.spi.server.ContainerRepositoryProvider;
import org.eclipse.net4j.util.container.IManagedContainer;
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverAgent.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverAgent.java
index 6d436283d0..5f95ccb8f5 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverAgent.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverAgent.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
*/
-package org.eclipse.emf.cdo.server.internal.net4j.syncing;
+package org.eclipse.emf.cdo.server.net4j;
import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.server.CDOServerUtil;
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverMonitor.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverMonitor.java
index a6b93056b6..033185678a 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/syncing/FailoverMonitor.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/net4j/FailoverMonitor.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
*/
-package org.eclipse.emf.cdo.server.internal.net4j.syncing;
+package org.eclipse.emf.cdo.server.net4j;
import org.eclipse.emf.cdo.server.internal.net4j.bundle.OM;

Back to the top