Move Cluster query methods to ClusterReadView, see #2202

* Better separation of concerns
* Internal API (could be made public if requested)
This commit is contained in:
Patrik Nordwall 2012-08-16 18:28:01 +02:00
parent 331cd7fca3
commit 4e2d7b0495
21 changed files with 257 additions and 211 deletions

View file

@ -46,7 +46,7 @@ abstract class LeaderElectionSpec
awaitClusterUp(first, second, third, fourth)
if (myself != controller) {
cluster.isLeader must be(myself == sortedRoles.head)
clusterView.isLeader must be(myself == sortedRoles.head)
assertLeaderIn(sortedRoles)
}
@ -87,7 +87,7 @@ abstract class LeaderElectionSpec
awaitUpConvergence(currentRoles.size - 1)
val nextExpectedLeader = remainingRoles.head
cluster.isLeader must be(myself == nextExpectedLeader)
clusterView.isLeader must be(myself == nextExpectedLeader)
assertLeaderIn(remainingRoles)
enterBarrier("completed")