Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4317A1796C for ; Tue, 24 Mar 2015 11:33:21 +0000 (UTC) Received: (qmail 45506 invoked by uid 500); 24 Mar 2015 11:33:21 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 45453 invoked by uid 500); 24 Mar 2015 11:33:21 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 45443 invoked by uid 99); 24 Mar 2015 11:33:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 11:33:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AF22CDFBD7; Tue, 24 Mar 2015 11:33:20 +0000 (UTC) From: imesh To: dev@stratos.apache.org Reply-To: dev@stratos.apache.org References: In-Reply-To: Subject: [GitHub] stratos pull request: Refining cartridge classes in cloud controll... Content-Type: text/plain Message-Id: <20150324113320.AF22CDFBD7@git1-us-west.apache.org> Date: Tue, 24 Mar 2015 11:33:20 +0000 (UTC) Github user imesh commented on a diff in the pull request: https://github.com/apache/stratos/pull/277#discussion_r27019543 --- Diff: components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java --- @@ -729,4 +741,96 @@ private void copyList(List sourceList, List destinationList) { destinationList.add(item); } } + + public Map> getPartitionToIaasProviderByCartridge() { + return partitionToIaasProviderByCartridge; + } + + public void setPartitionToIaasProvider(Map> partitionToIaasProviderByCartridge) { + this.partitionToIaasProviderByCartridge = partitionToIaasProviderByCartridge; + } + + public void addIaasProvider(String cartridgeId, String partitionId, IaasProvider iaasProvider) { + Map partitionToIaasProvider = new ConcurrentHashMap(); + partitionToIaasProvider.put(partitionId, iaasProvider); + this.partitionToIaasProviderByCartridge.put(cartridgeId, partitionToIaasProvider); + } + + public void addIaasProviders(String cartridgeId, Map map) { + Map partitionToIaasProvider = new ConcurrentHashMap(); + for (Iterator iterator = map.keySet().iterator(); iterator.hasNext(); ) { + String key = iterator.next(); + IaasProvider value = map.get(key); + + partitionToIaasProvider.put(key, value); + if (log.isDebugEnabled()) { + log.debug("Partition map updated for the Cartridge: " + this.hashCode() + ". " --- End diff -- Is there any reason for printing hash code? May be we can use cartridge type. Thanks --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---