Class RoleChangeNotifier
- java.lang.Object
-
- akka.actor.AbstractActor
-
- org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor
-
- org.opendaylight.controller.cluster.notifications.RoleChangeNotifier
-
- All Implemented Interfaces:
akka.actor.Actor
,AutoCloseable
,ExecuteInSelfActor
public class RoleChangeNotifier extends AbstractUntypedActor implements AutoCloseable
The RoleChangeNotifier is responsible for receiving Raft role and leader state change messages and notifying the listeners (within the same node), which are registered with it.The RoleChangeNotifier is instantiated by the Shard and injected into the RaftActor.
-
-
Field Summary
-
Fields inherited from class org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor
LOG
-
-
Constructor Summary
Constructors Constructor Description RoleChangeNotifier(String memberId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static akka.actor.Props
getProps(String memberId)
protected void
handleReceive(Object message)
Receive and handle an incoming message.void
preStart()
-
Methods inherited from class org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor
createReceive, executeInSelf, ignoreMessage, isValidSender, unknownMessage
-
Methods inherited from class akka.actor.AbstractActor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, emptyBehavior, getContext, getSelf, getSender, postRestart, postStop, preRestart, preRestart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled
-
-
-
-
Constructor Detail
-
RoleChangeNotifier
public RoleChangeNotifier(String memberId)
-
-
Method Detail
-
getProps
public static akka.actor.Props getProps(String memberId)
-
preStart
public void preStart() throws Exception
- Specified by:
preStart
in interfaceakka.actor.Actor
- Overrides:
preStart
in classakka.actor.AbstractActor
- Throws:
Exception
-
handleReceive
protected void handleReceive(Object message)
Description copied from class:AbstractUntypedActor
Receive and handle an incoming message. If the implementation does not handle this particular message, it should callAbstractUntypedActor.ignoreMessage(Object)
orAbstractUntypedActor.unknownMessage(Object)
.- Specified by:
handleReceive
in classAbstractUntypedActor
- Parameters:
message
- the incoming message
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-