Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-22 17:30:25 +0000
committerEike Stepper2010-09-22 17:30:25 +0000
commit16e28b8a6070952bd0fffd9d2c8df6316170d11e (patch)
tree0fd42894b9429ce1f6b470eb7f83bb781dadf828 /plugins/org.eclipse.emf.cdo.examples/src
parent70dda6326113fbf48486e1e1906e04654e4b869f (diff)
downloadcdo-16e28b8a6070952bd0fffd9d2c8df6316170d11e.tar.gz
cdo-16e28b8a6070952bd0fffd9d2c8df6316170d11e.tar.xz
cdo-16e28b8a6070952bd0fffd9d2c8df6316170d11e.zip
[325928] Provide FailoverMonitor server and FailoverAgents to coordinate fail-over scenarios
https://bugs.eclipse.org/bugs/show_bug.cgi?id=325928
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java12
1 files changed, 7 insertions, 5 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 3662029eab..ae62aafa44 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
@@ -48,6 +48,8 @@ import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.log.PrintLogHandler;
import org.h2.jdbcx.JdbcDataSource;
@@ -77,8 +79,8 @@ public abstract class FailoverExample
static
{
// OMPlatform.INSTANCE.setDebugging(true);
- // OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
// OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
+ OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
}
public FailoverExample()
@@ -441,8 +443,8 @@ public abstract class FailoverExample
agent.setConnectorDescription(host + ":" + port);
agent.setRepository(repository);
agent.setGroup(REPOSITORY_GROUP);
- agent.setRate(500L);
- agent.setTimeout(2000L);
+ agent.setRate(60000L);
+ agent.setTimeout(200000L);
agent.activate();
return repository;
@@ -464,13 +466,13 @@ public abstract class FailoverExample
@Override
protected void onAdded(IContainer<AgentProtocol> monitor, AgentProtocol agent)
{
- dump((FailoverMonitor)monitor, "Added", agent);
+ dump((FailoverMonitor)monitor, "Registered", agent);
}
@Override
protected void onRemoved(IContainer<AgentProtocol> monitor, AgentProtocol agent)
{
- dump((FailoverMonitor)monitor, "Removed", agent);
+ dump((FailoverMonitor)monitor, "Deregistered", agent);
}
private void dump(FailoverMonitor monitor, String event, AgentProtocol agent)

Back to the top