=clu replace Set -- with diff and ++ with union

* better performance according to
  https://docs.google.com/presentation/d/1Qjryxoe-fYEM8ZPhM-98LKfbhnRcn5eAEMNlVVnixsA/pub
This commit is contained in:
Patrik Nordwall 2015-10-30 14:59:36 +01:00
parent 9380983d3c
commit c7c187f6b7
24 changed files with 46 additions and 46 deletions

View file

@ -211,7 +211,7 @@ private[metrics] class ClusterMetricsCollector extends Actor with ActorLogging {
* Updates the initial node ring for those nodes that are [[akka.cluster.MemberStatus]] `Up`.
*/
def receiveState(state: CurrentClusterState): Unit =
nodes = (state.members -- state.unreachable) collect {
nodes = (state.members diff state.unreachable) collect {
case m if m.status == MemberStatus.Up || m.status == MemberStatus.WeaklyUp m.address
}