Merge pull request #668 from akka/wip-1588-cluster-death-watch-patriknw
Death watch hooked up with cluster failure detector, see #1588
This commit is contained in:
commit
911ef6b97e
9 changed files with 286 additions and 29 deletions
|
|
@ -5,11 +5,11 @@ package akka.cluster
|
|||
|
||||
import language.postfixOps
|
||||
import scala.collection.immutable.SortedSet
|
||||
|
||||
import akka.actor.{ Actor, ActorLogging, ActorRef, Address }
|
||||
import akka.cluster.ClusterEvent._
|
||||
import akka.cluster.MemberStatus._
|
||||
import akka.event.EventStream
|
||||
import akka.actor.AddressTerminated
|
||||
|
||||
/**
|
||||
* Domain events published to the event bus.
|
||||
|
|
@ -200,7 +200,14 @@ private[cluster] final class ClusterDomainEventPublisher extends Actor with Acto
|
|||
def publishChanges(oldGossip: Gossip, newGossip: Gossip): Unit = {
|
||||
// keep the latestGossip to be sent to new subscribers
|
||||
latestGossip = newGossip
|
||||
diff(oldGossip, newGossip) foreach { eventStream publish }
|
||||
diff(oldGossip, newGossip) foreach { event ⇒
|
||||
eventStream publish event
|
||||
// notify DeathWatch about unreachable node
|
||||
event match {
|
||||
case MemberUnreachable(m) ⇒ eventStream publish AddressTerminated(m.address)
|
||||
case _ ⇒
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def publishInternalStats(currentStats: CurrentInternalStats): Unit = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue