Repository: stratos Updated Branches: refs/heads/4.0.0-grouping bdca0f252 -> 47f302a6b
putting API method details in the TopologyManager class Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/47f302a6 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/47f302a6 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/47f302a6 Branch: refs/heads/4.0.0-grouping Commit: 47f302a6b18352d4f88f648efccfa72d80f2fd3c Parents: bdca0f2 Author: Isuru Haththotuwa <[email protected]> Authored: Thu Oct 9 10:36:37 2014 +0530 Committer: Isuru Haththotuwa <[email protected]> Committed: Thu Oct 9 10:36:37 2014 +0530 ---------------------------------------------------------------------- .../receiver/topology/TopologyManager.java | 26 ++++++-------------- 1 file changed, 8 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/47f302a6/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java index e39351f..d636912 100644 --- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java +++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyManager.java @@ -52,41 +52,31 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; * * Example 1: Acquiring write lock for a Cluster to modify the Cluster object - * acquiring: - * 1. acquire read lock for all Services - * 2. acquire read lock for the particular Service, to which the cluster belongs to - * 3. acquire write lock for the Cluster + * public static void acquireWriteLockForCluster (String serviceName, String clusterId) * * releasing: - * 1. release write lock for the Cluster - * 2. release read lock for the particular Service - * 3. release read lock for all Services + * public static void releaseWriteLockForCluster (String serviceName, String clusterId) * * Example 2: Acquiring write lock to add a new Cluster object - * acquiring: - * 1. acquire read lock for all Services - * 2. acquire write lock for the particular Service, to which the cluster belongs to + * public static void acquireWriteLockForService (String serviceName) * * releasing: - * 1. release write lock for the particular Service - * 2. release read lock for all Services + * public static void releaseWriteLockForService (String serviceName) * * Example 3: Acquiring read lock to read Cluster information * acquiring: - * 1. acquire read lock for all Services - * 2. acquire read lock for the particular Service, to which the cluster belongs to - * 3. acquire read lock for the relevant Cluster + * public static void acquireReadLockForCluster (String serviceName, String clusterId) * * releasing: - * 1. release read lock for the relevant Cluster - * 2. release read lock for the particular Service - * 3. release read lock for all Services + * public static void releaseReadLockForCluster (String serviceName, String clusterId) * * Example 4: Acquiring the write lock to add a deploy a Cartridge (add a new Service) * acquire: - * 1. acquire write lock for all Services + * public static void acquireWriteLockForServices() * * release: - * 1. release write lock for all Services + * public static void releaseWriteLockForServices() */ public class TopologyManager { private static final Log log = LogFactory.getLog(TopologyManager.class);
