You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/12/07 11:20:11 UTC

[42/50] [abbrv] stratos git commit: Update the AS registry manager

Update the AS registry manager


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

Branch: refs/heads/release-4.1.5
Commit: c1bafecd28682601b652f31f80286d23a690a664
Parents: 8bb91b7
Author: gayangunarathne <ga...@wso2.com>
Authored: Sun Dec 6 10:30:37 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:30 2015 +0000

----------------------------------------------------------------------
 .../apache/stratos/autoscaler/registry/RegistryManager.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c1bafecd/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index 925c4ff..343b76a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -85,7 +85,7 @@ public class RegistryManager {
         return instance;
     }
 
-    private Object retrieve(String resourcePath) {
+    private synchronized Object retrieve(String resourcePath) {
         try {
             Resource resource = registryService.get(resourcePath);
             return resource.getContent();
@@ -99,7 +99,7 @@ public class RegistryManager {
         }
     }
 
-    private void delete(String resourcePath) {
+    private synchronized void delete(String resourcePath) {
         try {
             registryService.beginTransaction();
             registryService.delete(resourcePath);
@@ -138,7 +138,7 @@ public class RegistryManager {
      * @param dataObj      object to be persisted.
      * @param resourcePath resource path to be persisted.
      */
-    private void persist(Object dataObj, String resourcePath) throws AutoScalerException {
+    private synchronized void persist(Object dataObj, String resourcePath) throws AutoScalerException {
 
         try {
             registryService.beginTransaction();