Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-11-18 05:26:51 -0500
committerEike Stepper2012-11-18 05:26:51 -0500
commit66317b1601c55b28e9ae930249f30d7a80ef3c9d (patch)
tree3ec8cac7190b67f3395f80a9359e7186931d407b
parent6848d5d3f5ac22e530b0489bf2360dfaa0cf2121 (diff)
downloadcdo-66317b1601c55b28e9ae930249f30d7a80ef3c9d.tar.gz
cdo-66317b1601c55b28e9ae930249f30d7a80ef3c9d.tar.xz
cdo-66317b1601c55b28e9ae930249f30d7a80ef3c9d.zip
[393911] Create a complete offline and fail-over example suite drops/I20121118-0527
https://bugs.eclipse.org/bugs/show_bug.cgi?id=393911
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java11
4 files changed, 24 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
index 046a8d05b1..2f6c1613a7 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
+++ b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
@@ -372,7 +372,16 @@ public class FailoverMonitorView extends AbstractView<FailoverMonitor>
return;
}
- int value = getNextValue() + RANDOM.nextInt(4) - 2;
+ int value = getNextValue() * (90 + RANDOM.nextInt(20)) / 100 + RANDOM.nextInt(4) - 2;
+ if (value > 100)
+ {
+ value = 100;
+ }
+ else if (value < -100)
+ {
+ value = -100;
+ }
+
int fx = y + value * channelHeight / 100;
values[i] = fx;
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties
index 6bacd99070..86953aa4b9 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-1/node.properties
@@ -1,7 +1,7 @@
#Node Settings
-#Sat Nov 17 12:49:21 CET 2012
+#Sun Nov 18 11:24:56 CET 2012
Name=failover-client-1
BrowserPort=7780
-Branch=MAIN
Type=Client
+Branch=MAIN
Server=failover-monitor
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties
index a9cd34e239..5d19efbd95 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/nodes/failover-client-2/node.properties
@@ -1,7 +1,7 @@
#Node Settings
-#Sat Nov 17 12:49:27 CET 2012
+#Sun Nov 18 11:24:42 CET 2012
Name=failover-client-2
BrowserPort=7781
-Type=Client
Branch=MAIN
+Type=Client
Server=failover-monitor
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
index 046a8d05b1..2f6c1613a7 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/FailoverMonitorView.java
@@ -372,7 +372,16 @@ public class FailoverMonitorView extends AbstractView<FailoverMonitor>
return;
}
- int value = getNextValue() + RANDOM.nextInt(4) - 2;
+ int value = getNextValue() * (90 + RANDOM.nextInt(20)) / 100 + RANDOM.nextInt(4) - 2;
+ if (value > 100)
+ {
+ value = 100;
+ }
+ else if (value < -100)
+ {
+ value = -100;
+ }
+
int fx = y + value * channelHeight / 100;
values[i] = fx;

Back to the top