public class JobClientActor extends FlinkUntypedActor implements LeaderRetrievalListener
LOG
Constructor and Description |
---|
JobClientActor(LeaderRetrievalService leaderRetrievalService,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutUpdates) |
Modifier and Type | Method and Description |
---|---|
static akka.actor.Props |
createJobClientActorProps(LeaderRetrievalService leaderRetrievalService,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutUpdates) |
protected UUID |
getLeaderSessionID()
Returns the current leader session ID associcated with this actor.
|
void |
handleError(Exception exception)
This method is called by the
LeaderRetrievalService in case of an exception. |
protected void |
handleMessage(Object message)
This method contains the actor logic which defines how to react to incoming messages.
|
void |
notifyLeaderAddress(String leaderAddress,
UUID leaderSessionID)
This method is called by the
LeaderRetrievalService when a new leader is elected. |
void |
postStop() |
void |
preStart() |
decorateMessage, onReceive
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, getContext, getSelf, getSender, postRestart, preRestart, receive, self, sender, supervisorStrategy, unhandled
public JobClientActor(LeaderRetrievalService leaderRetrievalService, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutUpdates)
public void preStart()
preStart
in interface akka.actor.Actor
preStart
in class akka.actor.UntypedActor
public void postStop()
postStop
in interface akka.actor.Actor
postStop
in class akka.actor.UntypedActor
protected void handleMessage(Object message)
FlinkUntypedActor
handleMessage
in class FlinkUntypedActor
message
- Incoming messageprotected UUID getLeaderSessionID()
FlinkUntypedActor
getLeaderSessionID
in class FlinkUntypedActor
public void notifyLeaderAddress(String leaderAddress, UUID leaderSessionID)
LeaderRetrievalListener
LeaderRetrievalService
when a new leader is elected.notifyLeaderAddress
in interface LeaderRetrievalListener
leaderAddress
- The address of the new leaderleaderSessionID
- The new leader session IDpublic void handleError(Exception exception)
LeaderRetrievalListener
LeaderRetrievalService
in case of an exception. This
assures that the LeaderRetrievalListener
is aware of any problems occurring in the
LeaderRetrievalService
thread.handleError
in interface LeaderRetrievalListener
public static akka.actor.Props createJobClientActorProps(LeaderRetrievalService leaderRetrievalService, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutUpdates)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.