From 4b5c2f62a60420f7a8229fffe6bd4016f86eae01 Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Fri, 15 Aug 2014 16:36:34 +0200 Subject: [PATCH 1/2] Made access to spotterProgress synchronized Change-Id: Ica9a6874a51ed499c5513a206fb0c5eb203515e7 Signed-off-by: Alexander Wert --- .../shared/status/DiagnosisProgress.java | 42 +++++++++++-------- .../shared/status/SpotterProgress.java | 4 +- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/org.spotter.shared/src/org/spotter/shared/status/DiagnosisProgress.java b/org.spotter.shared/src/org/spotter/shared/status/DiagnosisProgress.java index b70f6f1..81442a1 100644 --- a/org.spotter.shared/src/org/spotter/shared/status/DiagnosisProgress.java +++ b/org.spotter.shared/src/org/spotter/shared/status/DiagnosisProgress.java @@ -17,9 +17,9 @@ /** * Representation of the progress of a diagnosis step of Dynamic Spotter run. - * + * * @author Alexander Wert - * + * */ public class DiagnosisProgress { private String name; @@ -33,17 +33,23 @@ public class DiagnosisProgress { */ public DiagnosisProgress() { } - + /** * Constructor. - * @param name problem name - * @param status diagnosis status - * @param estimatedProgress estimated progress in percent - * @param estimatedRemainingDuration estimated remaining duration in seconds - * @param currentProgressMessage additional progress message + * + * @param name + * problem name + * @param status + * diagnosis status + * @param estimatedProgress + * estimated progress in percent + * @param estimatedRemainingDuration + * estimated remaining duration in seconds + * @param currentProgressMessage + * additional progress message */ - public DiagnosisProgress(String name, DiagnosisStatus status, double estimatedProgress, long estimatedRemainingDuration, - String currentProgressMessage) { + public DiagnosisProgress(String name, DiagnosisStatus status, double estimatedProgress, + long estimatedRemainingDuration, String currentProgressMessage) { super(); this.name = name; this.status = status; @@ -70,7 +76,7 @@ public void setName(String name) { /** * @return the status */ - public DiagnosisStatus getStatus() { + public synchronized DiagnosisStatus getStatus() { return status; } @@ -78,14 +84,14 @@ public DiagnosisStatus getStatus() { * @param status * the status to set */ - public void setStatus(DiagnosisStatus status) { + public synchronized void setStatus(DiagnosisStatus status) { this.status = status; } /** * @return the estimatedProgress */ - public double getEstimatedProgress() { + public synchronized double getEstimatedProgress() { return estimatedProgress; } @@ -93,14 +99,14 @@ public double getEstimatedProgress() { * @param estimatedProgress * the estimatedProgress to set */ - public void setEstimatedProgress(double estimatedProgress) { + public synchronized void setEstimatedProgress(double estimatedProgress) { this.estimatedProgress = estimatedProgress; } /** * @return the estimatedRemainingDuration */ - public long getEstimatedRemainingDuration() { + public synchronized long getEstimatedRemainingDuration() { return estimatedRemainingDuration; } @@ -108,14 +114,14 @@ public long getEstimatedRemainingDuration() { * @param estimatedRemainingDuration * the estimatedRemainingDuration to set */ - public void setEstimatedRemainingDuration(long estimatedRemainingDuration) { + public synchronized void setEstimatedRemainingDuration(long estimatedRemainingDuration) { this.estimatedRemainingDuration = estimatedRemainingDuration; } /** * @return the currentProgressMessage */ - public String getCurrentProgressMessage() { + public synchronized String getCurrentProgressMessage() { return currentProgressMessage; } @@ -123,7 +129,7 @@ public String getCurrentProgressMessage() { * @param currentProgressMessage * the currentProgressMessage to set */ - public void setCurrentProgressMessage(String currentProgressMessage) { + public synchronized void setCurrentProgressMessage(String currentProgressMessage) { this.currentProgressMessage = currentProgressMessage; } diff --git a/org.spotter.shared/src/org/spotter/shared/status/SpotterProgress.java b/org.spotter.shared/src/org/spotter/shared/status/SpotterProgress.java index 3efd4d6..f74725e 100644 --- a/org.spotter.shared/src/org/spotter/shared/status/SpotterProgress.java +++ b/org.spotter.shared/src/org/spotter/shared/status/SpotterProgress.java @@ -15,8 +15,8 @@ */ package org.spotter.shared.status; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * Progress of a Dynamic Spotter run/job. @@ -31,7 +31,7 @@ public class SpotterProgress { * Constructor. */ public SpotterProgress() { - problemProgressMapping = new HashMap<>(); + problemProgressMapping = new ConcurrentHashMap<>(); } From 84d7b8eba872584681c04c613c3c61e8b7d51bfa Mon Sep 17 00:00:00 2001 From: Alexander Wert Date: Fri, 15 Aug 2014 23:11:06 +0200 Subject: [PATCH 2/2] creating release version 1.0.0 Change-Id: Ic637d213e47934968364c34d1cce22218192005b Signed-off-by: Alexander Wert --- org.spotter.client/pom.xml | 6 +++--- org.spotter.core/pom.xml | 4 ++-- org.spotter.eclipse.ui/META-INF/MANIFEST.MF | 2 +- org.spotter.eclipse.ui/pom.xml | 2 +- org.spotter.parent/pom.xml | 4 ++-- org.spotter.runner/pom.xml | 4 ++-- org.spotter.service/pom.xml | 4 ++-- org.spotter.shared/pom.xml | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/org.spotter.client/pom.xml b/org.spotter.client/pom.xml index 916bc86..d9db14c 100644 --- a/org.spotter.client/pom.xml +++ b/org.spotter.client/pom.xml @@ -5,7 +5,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent @@ -23,13 +23,13 @@ org.spotter org.spotter.shared - 0.0.1-SNAPSHOT + 1.0.0 org.spotter org.spotter.service - 0.0.1-SNAPSHOT + 1.0.0 test diff --git a/org.spotter.core/pom.xml b/org.spotter.core/pom.xml index 92d1964..2661555 100644 --- a/org.spotter.core/pom.xml +++ b/org.spotter.core/pom.xml @@ -4,7 +4,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent @@ -16,7 +16,7 @@ org.spotter org.spotter.shared - 0.0.1-SNAPSHOT + 1.0.0 \ No newline at end of file diff --git a/org.spotter.eclipse.ui/META-INF/MANIFEST.MF b/org.spotter.eclipse.ui/META-INF/MANIFEST.MF index 049096a..222678e 100644 --- a/org.spotter.eclipse.ui/META-INF/MANIFEST.MF +++ b/org.spotter.eclipse.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: DynamicSpotter Eclipse UI Bundle-SymbolicName: org.spotter.eclipse.ui;singleton:=true -Bundle-Version: 0.0.1.qualifier +Bundle-Version: 1.0.0 Bundle-Vendor: SAP AG Bundle-Activator: org.spotter.eclipse.ui.Activator Require-Bundle: org.eclipse.ui;bundle-version="3.105.0", diff --git a/org.spotter.eclipse.ui/pom.xml b/org.spotter.eclipse.ui/pom.xml index 8d4197c..75ff191 100644 --- a/org.spotter.eclipse.ui/pom.xml +++ b/org.spotter.eclipse.ui/pom.xml @@ -4,7 +4,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent diff --git a/org.spotter.parent/pom.xml b/org.spotter.parent/pom.xml index 14d80d5..de44cad 100644 --- a/org.spotter.parent/pom.xml +++ b/org.spotter.parent/pom.xml @@ -3,12 +3,12 @@ 4.0.0 org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 pom DynamicSpotter - 1.0.2-SNAPSHOT + 1.0.3 diff --git a/org.spotter.runner/pom.xml b/org.spotter.runner/pom.xml index 2eb9d8c..143b0aa 100644 --- a/org.spotter.runner/pom.xml +++ b/org.spotter.runner/pom.xml @@ -5,7 +5,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent @@ -49,7 +49,7 @@ org.spotter org.spotter.core - 0.0.1-SNAPSHOT + 1.0.0 diff --git a/org.spotter.service/pom.xml b/org.spotter.service/pom.xml index d795e3d..468bcf2 100644 --- a/org.spotter.service/pom.xml +++ b/org.spotter.service/pom.xml @@ -7,7 +7,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent @@ -29,7 +29,7 @@ org.spotter org.spotter.runner - 0.0.1-SNAPSHOT + 1.0.0 diff --git a/org.spotter.shared/pom.xml b/org.spotter.shared/pom.xml index 233c7ac..1d6412d 100644 --- a/org.spotter.shared/pom.xml +++ b/org.spotter.shared/pom.xml @@ -4,7 +4,7 @@ org.spotter org.spotter.parent - 0.0.1-SNAPSHOT + 1.0.0 ../org.spotter.parent