brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [05/21] incubator-brooklyn git commit: Delete deprecated HighAvailabilityManager.getManagementPlaneSyncState
Date Sat, 01 Aug 2015 15:45:58 GMT
Delete deprecated HighAvailabilityManager.getManagementPlaneSyncState


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

Branch: refs/heads/master
Commit: f49ca1b7e9dee43760355929337b801a043eebfd
Parents: 29c9718
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Jul 28 22:52:23 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sat Aug 1 00:13:31 2015 +0100

----------------------------------------------------------------------
 .../java/brooklyn/management/ha/HighAvailabilityManager.java   | 6 ------
 .../brooklyn/management/ha/HighAvailabilityManagerImpl.java    | 5 -----
 .../management/internal/NonDeploymentManagementContext.java    | 4 ----
 .../management/ha/HighAvailabilityManagerSplitBrainTest.java   | 4 ++--
 .../management/ha/HighAvailabilityManagerTestFixture.java      | 2 +-
 5 files changed, 3 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f49ca1b7/api/src/main/java/brooklyn/management/ha/HighAvailabilityManager.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/brooklyn/management/ha/HighAvailabilityManager.java b/api/src/main/java/brooklyn/management/ha/HighAvailabilityManager.java
index c530116..a525601 100644
--- a/api/src/main/java/brooklyn/management/ha/HighAvailabilityManager.java
+++ b/api/src/main/java/brooklyn/management/ha/HighAvailabilityManager.java
@@ -113,12 +113,6 @@ public interface HighAvailabilityManager {
     ManagementPlaneSyncRecord getLastManagementPlaneSyncRecord();
     
     /**
-     * @deprecated since 0.7.0 use {@link #getLastManagementPlaneSyncRecord()} or {@link
#loadManagementPlaneSyncRecord(boolean)}
-     * to be explicit about the source.  
-     */
-    ManagementPlaneSyncRecord getManagementPlaneSyncState();
-    
-    /**
      * @param useLocalKnowledgeForThisNode - if true, the record for this mgmt node will
be replaced with the
      * actual current status known in this JVM (may be more recent than what is persisted);
      * for most purposes there is little difference but in some cases the local node being
updated

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f49ca1b7/core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java b/core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java
index 4c631c7..edb16c7 100644
--- a/core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java
+++ b/core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java
@@ -531,11 +531,6 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager
{
         return lastSyncRecord;
     }
     
-    @Override
-    public ManagementPlaneSyncRecord getManagementPlaneSyncState() {
-        return loadManagementPlaneSyncRecord(true);
-    }
-
     @SuppressWarnings("unchecked")
     protected void registerPollTask() {
         final Runnable job = new Runnable() {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f49ca1b7/core/src/main/java/brooklyn/management/internal/NonDeploymentManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/internal/NonDeploymentManagementContext.java
b/core/src/main/java/brooklyn/management/internal/NonDeploymentManagementContext.java
index b437561..329fead 100644
--- a/core/src/main/java/brooklyn/management/internal/NonDeploymentManagementContext.java
+++ b/core/src/main/java/brooklyn/management/internal/NonDeploymentManagementContext.java
@@ -604,10 +604,6 @@ public class NonDeploymentManagementContext implements ManagementContextInternal
             throw new IllegalStateException("Non-deployment context "+NonDeploymentManagementContext.this+"
is not valid for this operation.");
         }
         @Override
-        public ManagementPlaneSyncRecord getManagementPlaneSyncState() {
-            throw new IllegalStateException("Non-deployment context "+NonDeploymentManagementContext.this+"
is not valid for this operation.");
-        }
-        @Override
         public ManagementPlaneSyncRecord getLastManagementPlaneSyncRecord() {
             throw new IllegalStateException("Non-deployment context "+NonDeploymentManagementContext.this+"
is not valid for this operation.");
         }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f49ca1b7/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
b/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
index 5a521cb..934090c 100644
--- a/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
+++ b/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
@@ -359,7 +359,7 @@ public class HighAvailabilityManagerSplitBrainTest {
         
         log.info("publish "+n1.ownNodeId);
         n1.ha.publishAndCheck(false);
-        ManagementPlaneSyncRecord memento1b = n1.ha.getManagementPlaneSyncState();
+        ManagementPlaneSyncRecord memento1b = n1.ha.loadManagementPlaneSyncRecord(true);
         log.info(n1+" HA now: "+memento1b);
         
         ManagementNodeState expectedStateAfterDemotion = BrooklynFeatureEnablement.isEnabled(BrooklynFeatureEnablement.FEATURE_DEFAULT_STANDBY_IS_HOT_PROPERTY)
?
@@ -373,7 +373,7 @@ public class HighAvailabilityManagerSplitBrainTest {
         assertEquals(memento1b.getManagementNodes().get(n2.ownNodeId).getRemoteTimestamp(),
time1);
         
         // n2 now sees itself as master, with n1 in standby again
-        ManagementPlaneSyncRecord memento2c = n2.ha.getManagementPlaneSyncState();
+        ManagementPlaneSyncRecord memento2c = n2.ha.loadManagementPlaneSyncRecord(true);
         log.info(n2+" HA now: "+memento2c);
         assertEquals(memento2c.getManagementNodes().get(n1.ownNodeId).getStatus(), expectedStateAfterDemotion);
         assertEquals(memento2c.getManagementNodes().get(n2.ownNodeId).getStatus(), ManagementNodeState.MASTER);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f49ca1b7/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerTestFixture.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerTestFixture.java
b/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerTestFixture.java
index c9026e8..e1ecad7 100644
--- a/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerTestFixture.java
+++ b/core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerTestFixture.java
@@ -126,7 +126,7 @@ public abstract class HighAvailabilityManagerTestFixture {
             .setLocalTicker(ticker)
             .setRemoteTicker(ticker);
         try {
-            ManagementPlaneSyncRecord state = manager2.getManagementPlaneSyncState();
+            ManagementPlaneSyncRecord state = manager2.loadManagementPlaneSyncRecord(true);
             assertNotNull(state);
         } finally {
             manager2.stop();


Mime
View raw message