brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [02/28] incubator-brooklyn git commit: Add external-config-supplier registry to management context.
Date Tue, 01 Sep 2015 15:16:25 GMT
Add external-config-supplier registry to management context.


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

Branch: refs/heads/master
Commit: 3ed391a25fdf52adbc51cf7b11029966995aeeba
Parents: b0b4cd8
Author: Alasdair Hodge <github@alasdairhodge.co.uk>
Authored: Mon Jun 22 16:52:28 2015 +0100
Committer: Alasdair Hodge <github@alasdairhodge.co.uk>
Committed: Tue Aug 25 11:49:23 2015 +0100

----------------------------------------------------------------------
 .../core/mgmt/internal/AbstractManagementContext.java  | 13 +++++++++++--
 .../core/mgmt/internal/ManagementContextInternal.java  |  3 +++
 .../mgmt/internal/NonDeploymentManagementContext.java  |  6 ++++++
 3 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3ed391a2/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
index cdd7219..76871cd 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
@@ -164,9 +164,11 @@ public abstract class AbstractManagementContext implements ManagementContextInte
 
     private final BrooklynStorage storage;
 
+    protected final ExternalConfigSupplierRegistry configSupplierRegistry;
+
     private volatile boolean running = true;
     protected boolean startupComplete = false;
-    protected final List<Throwable> errors = Collections.synchronizedList(MutableList.<Throwable>of());

+    protected final List<Throwable> errors = Collections.synchronizedList(MutableList.<Throwable>of());
 
     protected Maybe<URI> uri = Maybe.absent();
     protected CatalogInitialization catalogInitialization;
@@ -191,6 +193,7 @@ public abstract class AbstractManagementContext implements ManagementContextInte
         this.highAvailabilityManager = new HighAvailabilityManagerImpl(this); // TODO leaking
"this" reference; yuck
         
         this.entitlementManager = Entitlements.newManager(this, brooklynProperties);
+        this.configSupplierRegistry = new BasicExternalConfigSupplierRegistry(this); // TODO
leaking "this" reference; yuck
     }
 
     @Override
@@ -478,5 +481,11 @@ public abstract class AbstractManagementContext implements ManagementContextInte
     public List<Throwable> errors() {
         return errors;
     }
-    
+
+    /** @since 0.8.0 */
+    @Override
+    public ExternalConfigSupplierRegistry getExternalConfigProviderRegistry() {
+        return configSupplierRegistry;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3ed391a2/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
index 933f0ac..e76f2fb 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
@@ -119,4 +119,7 @@ public interface ManagementContextInternal extends ManagementContext {
     @Beta
     void setCatalogInitialization(CatalogInitialization catalogInitialization);
 
+    @Beta
+    ExternalConfigSupplierRegistry getExternalConfigProviderRegistry();
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/3ed391a2/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
index 7e1c324..87e8f84 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
@@ -465,6 +465,12 @@ public class NonDeploymentManagementContext implements ManagementContextInternal
         initialManagementContext.setCatalogInitialization(catalogInitialization);
     }
 
+    @Override
+    public ExternalConfigSupplierRegistry getExternalConfigProviderRegistry() {
+        checkInitialManagementContextReal();
+        return initialManagementContext.getExternalConfigProviderRegistry();
+    }
+
     /**
      * For when the initial management context is not "real"; the changeListener is a no-op,
but everything else forbidden.
      * 


Mime
View raw message