brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [4/7] incubator-brooklyn git commit: Replace deprecated methods with preferred alternative
Date Mon, 26 Oct 2015 12:31:25 GMT
Replace deprecated methods with preferred alternative


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

Branch: refs/heads/master
Commit: ad6ac1e00587071f227995808a1c76b1402e9bbf
Parents: 0de0a2a
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Thu Oct 15 17:40:26 2015 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Mon Oct 19 16:49:06 2015 +0300

----------------------------------------------------------------------
 .../brooklyn/entity/database/mysql/MySqlClusterImpl.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ad6ac1e0/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
index e6afc18..77b7c7b 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
@@ -208,12 +208,12 @@ public class MySqlClusterImpl extends DynamicClusterImpl implements
MySqlCluster
             ServiceNotUpLogic.updateNotUpIndicator(localNode, MySqlSlave.SLAVE_HEALTHY, "Replication
not started");
 
             addFeed(FunctionFeed.builder()
-                .entity((EntityLocal)node)
+                .entity(localNode)
                 .period(Duration.FIVE_SECONDS)
                 .poll(FunctionPollConfig.forSensor(MySqlSlave.SLAVE_HEALTHY)
                         .callable(new SlaveStateCallable(node))
                         .checkSuccess(StringPredicates.isNonBlank())
-                        .onSuccess(new SlaveStateParser(localNode))
+                        .onSuccess(new SlaveStateParser(node))
                         .setOnFailure(false)
                         .description("Polls SHOW SLAVE STATUS"))
                 .build());
@@ -244,9 +244,9 @@ public class MySqlClusterImpl extends DynamicClusterImpl implements MySqlCluster
     }
 
     public static class SlaveStateParser implements Function<String, Boolean> {
-        private EntityLocal slave;
+        private Entity slave;
 
-        public SlaveStateParser(EntityLocal slave) {
+        public SlaveStateParser(Entity slave) {
             this.slave = slave;
         }
 
@@ -297,7 +297,7 @@ public class MySqlClusterImpl extends DynamicClusterImpl implements MySqlCluster
                     !Boolean.TRUE.equals(node.getAttribute(NODE_REPLICATION_INITIALIZED)))
{
 
                 // Events executed sequentially so no need to synchronize here.
-                ((EntityLocal)node).setAttribute(NODE_REPLICATION_INITIALIZED, Boolean.TRUE);
+                node.sensors().set(NODE_REPLICATION_INITIALIZED, Boolean.TRUE);
 
                 final Runnable nodeInitTaskBody;
                 if (MySqlClusterUtils.IS_MASTER.apply(node)) {


Mime
View raw message