class
ClusterSingletonManager extends Actor with FSM[State, Data]
Type Members
-
type
Event = actor.FSM.Event[Data]
-
-
-
-
-
-
final
class
TransformHelper extends AnyRef
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
val
->: actor.FSM.->.type
-
final
def
==(arg0: Any): Boolean
-
val
Event: actor.FSM.Event.type
-
val
StateTimeout: actor.FSM.StateTimeout.type
-
val
StopEvent: actor.FSM.StopEvent.type
-
-
def
aroundPostRestart(reason: Throwable): Unit
-
def
aroundPostStop(): Unit
-
def
aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
-
def
aroundPreStart(): Unit
-
def
aroundReceive(receive: actor.Actor.Receive, msg: Any): Unit
-
final
def
asInstanceOf[T0]: T0
-
final
def
cancelTimer(name: String): Unit
-
def
cleanupOverdueNotMemberAnyMore(): Unit
-
def
clone(): AnyRef
-
val
cluster: Cluster
-
-
val
coordShutdown: CoordinatedShutdown
-
-
-
-
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
getNextOldestChanged(): Unit
-
def
gossip(msg: Any)(implicit sender: ActorRef): Unit
-
-
def
gotoHandingOver(singleton: ActorRef, singletonTerminated: Boolean, handOverTo: Option[ActorRef]): State
-
def
gotoOldest(): State
-
def
gotoStopping(singleton: ActorRef): State
-
-
def
hashCode(): Int
-
final
def
initialize(): Unit
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
isTimerActive(name: String): Boolean
-
def
listenerManagement: actor.Actor.Receive
-
val
listeners: Set[ActorRef]
-
-
def
logInfo(template: String, arg1: Any, arg2: Any): Unit
-
def
logInfo(template: String, arg1: Any): Unit
-
def
logInfo(message: String): Unit
-
def
logTermination(reason: Reason): Unit
-
val
maxHandOverRetries: Int
-
val
maxTakeOverRetries: Int
-
val
memberExitingProgress: Promise[Done]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
nextStateData: Data
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
var
oldestChangedBuffer: ActorRef
-
var
oldestChangedReceived: Boolean
-
-
final
def
onTransition(transitionHandler: TransitionHandler): Unit
-
-
def
postRestart(reason: Throwable): Unit
-
def
postStop(): Unit
-
def
preRestart(reason: Throwable, message: Option[Any]): Unit
-
def
preStart(): Unit
-
-
-
-
def
scheduleDelayedMemberRemoved(m: Member): Unit
-
implicit final
val
self: ActorRef
-
var
selfExited: Boolean
-
def
selfMemberExited(): Unit
-
val
selfUniqueAddressOption: Some[UniqueAddress]
-
final
def
sender(): ActorRef
-
-
final
def
setTimer(name: String, msg: Any, timeout: FiniteDuration, repeat: Boolean): Unit
-
-
final
def
stateData: Data
-
-
final
def
stay(): State
-
final
def
stop(reason: Reason, stateData: Data): State
-
final
def
stop(reason: Reason): State
-
final
def
stop(): State
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
-
-
def
unhandled(message: Any): Unit
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
-
final
def
whenUnhandled(stateFunction: StateFunction): Unit
-
Shadowed Implicit Value Members
-
Inherited from AnyRef
Inherited from Any
Manages singleton actor instance among all cluster nodes or a group of nodes tagged with a specific role. At most one singleton instance is running at any point in time.
The ClusterSingletonManager is supposed to be started on all nodes, or all nodes with specified role, in the cluster with
actorOf
. The actual singleton is started on the oldest node by creating a child actor from the suppliedsingletonProps
.The singleton actor is always running on the oldest member with specified role. The oldest member is determined by akka.cluster.Member#isOlderThan. This can change when removing members. A graceful hand over can normally be performed when current oldest node is leaving the cluster. Be aware that there is a short time period when there is no active singleton during the hand-over process.
The cluster failure detector will notice when oldest node becomes unreachable due to things like JVM crash, hard shut down, or network failure. When the crashed node has been removed (via down) from the cluster then a new oldest node will take over and a new singleton actor is created. For these failure scenarios there will not be a graceful hand-over, but more than one active singletons is prevented by all reasonable means. Some corner cases are eventually resolved by configurable timeouts.
You access the singleton actor with ClusterSingletonProxy. Alternatively the singleton actor may broadcast its existence when it is started.
Use factory method ClusterSingletonManager#props to create the akka.actor.Props for the actor.
Not intended for subclassing by user code.