brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [12/50] brooklyn-library git commit: converting postConstruct to init
Date Mon, 01 Feb 2016 17:46:30 GMT
converting postConstruct to init


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/32a6eba5
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/32a6eba5
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/32a6eba5

Branch: refs/heads/0.5.0
Commit: 32a6eba53bc5706d3f097d0300230a06c66f5829
Parents: 3c0f5e6
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Apr 1 12:30:26 2013 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Mon Apr 1 12:41:41 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/brooklyn/demo/GlobalWebFabricExample.java    | 2 +-
 .../src/main/java/brooklyn/extras/whirr/WhirrExample.java      | 4 ++--
 .../main/java/brooklyn/extras/whirr/WhirrHadoopExample.java    | 4 ++--
 .../java/brooklyn/demo/MonitoredCassandraClusterExample.java   | 2 +-
 .../cloudfoundry/MovableCloudFoundryClusterExample.java        | 2 +-
 .../src/main/java/brooklyn/demo/StandaloneBrokerExample.java   | 2 +-
 .../src/main/java/brooklyn/demo/SingleWebServerExample.java    | 2 +-
 .../src/main/java/brooklyn/demo/WebClusterDatabaseExample.java | 2 +-
 .../main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java  | 6 ++----
 .../java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy  | 2 +-
 .../src/main/java/brooklyn/demo/WebClusterExample.java         | 2 +-
 11 files changed, 14 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/global-web-fabric/src/main/java/brooklyn/demo/GlobalWebFabricExample.java
----------------------------------------------------------------------
diff --git a/examples/global-web-fabric/src/main/java/brooklyn/demo/GlobalWebFabricExample.java
b/examples/global-web-fabric/src/main/java/brooklyn/demo/GlobalWebFabricExample.java
index dbfab17..774affa 100644
--- a/examples/global-web-fabric/src/main/java/brooklyn/demo/GlobalWebFabricExample.java
+++ b/examples/global-web-fabric/src/main/java/brooklyn/demo/GlobalWebFabricExample.java
@@ -41,7 +41,7 @@ public class GlobalWebFabricExample extends AbstractApplication {
         );
 
     @Override
-    public void postConstruct() {
+    public void init() {
         StringConfigMap config = getManagementContext().getConfig();
         
         GeoscalingDnsService geoDns = addChild(EntitySpecs.spec(GeoscalingDnsService.class)

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrExample.java
----------------------------------------------------------------------
diff --git a/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrExample.java
b/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrExample.java
index d01bc4c..aef2f0e 100644
--- a/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrExample.java
+++ b/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrExample.java
@@ -27,8 +27,8 @@ public class WhirrExample extends AbstractApplication {
             "whirr.instance-templates=1 noop, 1 elasticsearch"+"\n";
 
     @Override
-    public void postConstruct() {
-        WhirrCluster cluster = addChild(EntitySpecs.spec(WhirrCluster.class)
+    public void init() {
+        addChild(EntitySpecs.spec(WhirrCluster.class)
                 .configure("recipe", RECIPE));
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrHadoopExample.java
----------------------------------------------------------------------
diff --git a/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrHadoopExample.java
b/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrHadoopExample.java
index 7a51b0c..d15d163 100644
--- a/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrHadoopExample.java
+++ b/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/WhirrHadoopExample.java
@@ -23,8 +23,8 @@ public class WhirrHadoopExample extends AbstractApplication {
     public static final String DEFAULT_LOCATION = "aws-ec2:eu-west-1";
 
     @Override
-    public void postConstruct() {
-        WhirrCluster cluster = addChild(EntitySpecs.spec(WhirrHadoopCluster.class)
+    public void init() {
+        addChild(EntitySpecs.spec(WhirrHadoopCluster.class)
                 .displayName("brooklyn-hadoop-example")
                 .configure("size", 2)
                 .configure("memory", 2048));

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/monitored-cassandra-cluster/src/main/java/brooklyn/demo/MonitoredCassandraClusterExample.java
----------------------------------------------------------------------
diff --git a/examples/monitored-cassandra-cluster/src/main/java/brooklyn/demo/MonitoredCassandraClusterExample.java
b/examples/monitored-cassandra-cluster/src/main/java/brooklyn/demo/MonitoredCassandraClusterExample.java
index 6c475b2..9c543e3 100644
--- a/examples/monitored-cassandra-cluster/src/main/java/brooklyn/demo/MonitoredCassandraClusterExample.java
+++ b/examples/monitored-cassandra-cluster/src/main/java/brooklyn/demo/MonitoredCassandraClusterExample.java
@@ -8,7 +8,7 @@ import brooklyn.entity.proxying.EntitySpecs;
 public class MonitoredCassandraClusterExample extends AbstractApplication {
 
     @Override
-    public void postConstruct() {
+    public void init() {
         addChild(EntitySpecs.spec(CassandraCluster.class)
                 .configure("initialSize", "2")
                 .configure("clusterName", "CassandraDemo")

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/MovableCloudFoundryClusterExample.java
----------------------------------------------------------------------
diff --git a/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/MovableCloudFoundryClusterExample.java
b/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/MovableCloudFoundryClusterExample.java
index ee96826..3b30d1e 100644
--- a/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/MovableCloudFoundryClusterExample.java
+++ b/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/MovableCloudFoundryClusterExample.java
@@ -16,7 +16,7 @@ public class MovableCloudFoundryClusterExample extends AbstractApplication
{
     public static final String WAR_FILE_URL = "classpath://hello-world-webapp.war";
 
     @Override
-    public void postConstruct() {
+    public void init() {
         addChild(EntitySpecs.spec(MovableElasticWebAppCluster.class)
                 .configure("war", WAR_FILE_URL));
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-messaging-pubsub/src/main/java/brooklyn/demo/StandaloneBrokerExample.java
----------------------------------------------------------------------
diff --git a/examples/simple-messaging-pubsub/src/main/java/brooklyn/demo/StandaloneBrokerExample.java
b/examples/simple-messaging-pubsub/src/main/java/brooklyn/demo/StandaloneBrokerExample.java
index 3d9b903..83cdc31 100644
--- a/examples/simple-messaging-pubsub/src/main/java/brooklyn/demo/StandaloneBrokerExample.java
+++ b/examples/simple-messaging-pubsub/src/main/java/brooklyn/demo/StandaloneBrokerExample.java
@@ -24,7 +24,7 @@ public class StandaloneBrokerExample extends AbstractApplication {
     public static final String DEFAULT_LOCATION = "localhost";
     
     @Override
-    public void postConstruct() {
+    public void init() {
         // Configure the Qpid broker entity
     	QpidBroker broker = addChild(EntitySpecs.spec(QpidBroker.class)
     	        .configure("amqpPort", 5672)

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-web-cluster/src/main/java/brooklyn/demo/SingleWebServerExample.java
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/SingleWebServerExample.java
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/SingleWebServerExample.java
index 10905e1..3272a6c 100644
--- a/examples/simple-web-cluster/src/main/java/brooklyn/demo/SingleWebServerExample.java
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/SingleWebServerExample.java
@@ -22,7 +22,7 @@ public class SingleWebServerExample extends AbstractApplication {
     private static final String WAR_PATH = "classpath://hello-world-webapp.war";
 
     @Override
-    public void postConstruct() {
+    public void init() {
         addChild(EntitySpecs.spec(JBoss7Server.class)
                 .configure("war", WAR_PATH)
                 .configure("httpPort", "8080+"));

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExample.java
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExample.java
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExample.java
index 5436ee6..5c673b1 100644
--- a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExample.java
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExample.java
@@ -48,7 +48,7 @@ public class WebClusterDatabaseExample extends AbstractApplication {
             "appservers.count", "Number of app servers deployed");
 
     @Override
-    public void postConstruct() {
+    public void init() {
         MySqlNode mysql = addChild(EntitySpecs.spec(MySqlNode.class)
                 .configure("creationScriptUrl", DB_SETUP_SQL_URL));
         

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java
index df88bb9..014a58a 100644
--- a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleApp.java
@@ -41,10 +41,8 @@ import com.google.common.collect.Lists;
 /**
  * Launches a 3-tier app with nginx, clustered jboss, and mysql.
  * <p>
- * Demonstrates how to define a new Application Entity class (reusable and extensible),
- * as opposed to just using the builder as in {@link WebClusterDatabaseExample}.
- * With an app, when we define public static sensors and runtime config _on the app class_

- * (not the builder) they can be discovered at runtime.
+ * Includes some advanced features such as KPI / derived sensors,
+ * and annotations for use in a catalog.
  * <p>
  * This variant also increases minimum size to 2.  
  * Note the policy min size must have the same value,

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
index ee2652c..542cd8a 100644
--- a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
@@ -39,7 +39,7 @@ public class WebClusterDatabaseExampleGroovy extends AbstractApplication
{
     public static final String DB_PASSWORD = "br00k11n";
     
     @Override
-    public void postConstruct() {
+    public void init() {
         MySqlNode mysql = addChild(MySqlNode,
                 creationScriptUrl: DB_SETUP_SQL_URL);
         

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/32a6eba5/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterExample.java
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterExample.java
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterExample.java
index 8e6f670..86c28ee 100644
--- a/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterExample.java
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/WebClusterExample.java
@@ -41,7 +41,7 @@ public class WebClusterExample extends AbstractApplication {
     private ControlledDynamicWebAppCluster web;
     
     @Override
-    public void postConstruct() {
+    public void init() {
         nginxController = addChild(EntitySpecs.spec(NginxController.class)
                 //.configure("domain", "webclusterexample.brooklyn.local")
                 .configure("port", "8000+"));


Mime
View raw message