Annotated extendable cluster tool actors with DoNotInherit (#23335)

This commit is contained in:
Johan Andrén 2017-07-26 10:42:13 +02:00 committed by GitHub
parent daa1d6c5f0
commit 6cd3b17854
2 changed files with 12 additions and 0 deletions

View file

@ -10,7 +10,9 @@ import scala.concurrent.duration._
import java.util.concurrent.ThreadLocalRandom
import java.net.URLEncoder
import java.net.URLDecoder
import akka.actor._
import akka.annotation.DoNotInherit
import akka.cluster.Cluster
import akka.cluster.ClusterEvent._
import akka.cluster.Member
@ -24,6 +26,7 @@ import akka.routing.RouterEnvelope
import akka.routing.RoundRobinRoutingLogic
import akka.routing.ConsistentHashingRoutingLogic
import akka.routing.BroadcastRoutingLogic
import scala.collection.immutable.TreeMap
import com.typesafe.config.Config
import akka.dispatch.Dispatchers
@ -475,7 +478,10 @@ trait DistributedPubSubMessage extends Serializable
* Successful `Subscribe` and `Unsubscribe` is acknowledged with
* [[DistributedPubSubMediator.SubscribeAck]] and [[DistributedPubSubMediator.UnsubscribeAck]]
* replies.
*
* Not intended for subclassing by user code.
*/
@DoNotInherit
class DistributedPubSubMediator(settings: DistributedPubSubSettings) extends Actor with ActorLogging with PerGroupingBuffer {
import DistributedPubSubMediator._

View file

@ -5,6 +5,7 @@
package akka.cluster.singleton
import com.typesafe.config.Config
import scala.concurrent.duration._
import scala.collection.immutable
import akka.actor.Actor
@ -25,9 +26,11 @@ import akka.AkkaException
import akka.actor.NoSerializationVerificationNeeded
import akka.cluster.UniqueAddress
import akka.cluster.ClusterEvent
import scala.concurrent.Promise
import akka.Done
import akka.actor.CoordinatedShutdown
import akka.annotation.DoNotInherit
import akka.pattern.ask
import akka.util.Timeout
@ -394,6 +397,8 @@ class ClusterSingletonManagerIsStuck(message: String) extends AkkaException(mess
* Use factory method [[ClusterSingletonManager#props]] to create the
* [[akka.actor.Props]] for the actor.
*
* Not intended for subclassing by user code.
*
*
* @param singletonProps [[akka.actor.Props]] of the singleton actor instance.
*
@ -407,6 +412,7 @@ class ClusterSingletonManagerIsStuck(message: String) extends AkkaException(mess
*
* @param settings see [[ClusterSingletonManagerSettings]]
*/
@DoNotInherit
class ClusterSingletonManager(
singletonProps: Props,
terminationMessage: Any,