Repository: incubator-stratos
Updated Branches:
  refs/heads/master 720cee28e -> d2499fbd4


synchronize registry calls, to avoid concurrent modifications


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ab73ebd0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ab73ebd0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ab73ebd0

Branch: refs/heads/master
Commit: ab73ebd0f463326e5f91872494c3b463cf65edd9
Parents: 8fbb271
Author: Nirmal Fernando <[email protected]>
Authored: Mon Mar 31 20:22:02 2014 +0530
Committer: Nirmal Fernando <[email protected]>
Committed: Mon Mar 31 20:22:02 2014 +0530

----------------------------------------------------------------------
 .../stratos/cloud/controller/registry/RegistryManager.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ab73ebd0/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
index 8492acf..3162fca 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
@@ -78,7 +78,7 @@ public class RegistryManager {
      *
      * @param dataObj object to be persisted.
      */
-    public void persist(FasterLookUpDataHolder dataObj) throws 
RegistryException {
+    public synchronized void persist(FasterLookUpDataHolder dataObj) throws 
RegistryException {
         try {
                
                PrivilegedCarbonContext ctx = 
PrivilegedCarbonContext.getThreadLocalCarbonContext();
@@ -104,7 +104,7 @@ public class RegistryManager {
         }
     }
 
-    public void persistTopology(Topology topology) throws RegistryException {
+    public synchronized void persistTopology(Topology topology) throws 
RegistryException {
         try {
                
                PrivilegedCarbonContext ctx = 
PrivilegedCarbonContext.getThreadLocalCarbonContext();
@@ -131,7 +131,7 @@ public class RegistryManager {
     }
 
 
-    public Object retrieve() {
+    public synchronized Object retrieve() {
 
         try {
                PrivilegedCarbonContext ctx = 
PrivilegedCarbonContext.getThreadLocalCarbonContext();
@@ -153,7 +153,7 @@ public class RegistryManager {
 
     }
 
-    public Object retrieveTopology() {
+    public synchronized Object retrieveTopology() {
 
         try {
                        PrivilegedCarbonContext ctx = PrivilegedCarbonContext

Reply via email to