Introduce the onReceiveTimeout hook for SeedNodeProcess (#28646)

This commit is contained in:
Yury Gribkov 2020-02-25 17:06:44 -05:00 committed by GitHub
parent 23b45daf05
commit 94bebb330a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,8 @@ import scala.collection.immutable
import scala.concurrent.duration.{ Deadline, _ }
import akka.actor.{ Actor, ActorRef, Address, CoordinatedShutdown, ReceiveTimeout }
import akka.annotation.InternalApi
import akka.annotation.{ InternalApi, InternalStableApi }
import akka.util.unused
/**
* INTERNAL API.
@ -289,8 +290,12 @@ private[cluster] final class JoinSeedNodeProcess(
seedNodes.filterNot(_ == selfAddress).mkString(", "))
// no InitJoinAck received, try again
self ! JoinSeedNode
onReceiveTimeout(seedNodes, attempt)
}
@InternalStableApi
private[akka] def onReceiveTimeout(@unused seedNodes: immutable.IndexedSeq[Address], @unused attempt: Int): Unit = {}
def done: Actor.Receive = {
case InitJoinAck(_, _) => // already received one, skip rest
case ReceiveTimeout => context.stop(self)