public class JobInfo extends Object implements scala.Serializable
JobManager
. The JobInfo stores which actor
submitted the job, when the start time and, if already terminated, the end time was.
Additionally, it stores whether the job was started in the detached mode. Detached means that
the submitting actor does not wait for the job result once the job has terminated.
Important: This class is serializable, but needs to be deserialized in the context of an actor
system in order to resolve the client ActorRef
. It is possible to serialize the Akka URL
manually, but it is cumbersome and complicates testing in certain scenarios, where you need to
make sure to resolve the correct ActorRef
s when submitting jobs (RepointableActorRef vs.
RemoteActorRef).
param: client Actor which submitted the job param: start Starting time
Constructor and Description |
---|
JobInfo(akka.actor.ActorRef client,
ListeningBehaviour listeningBehaviour,
long start,
long sessionTimeout) |
Modifier and Type | Method and Description |
---|---|
static JobInfo |
apply(akka.actor.ActorRef client,
ListeningBehaviour listeningBehaviour,
long start,
long sessionTimeout) |
scala.collection.mutable.HashSet<scala.Tuple2<akka.actor.ActorRef,ListeningBehaviour>> |
clients() |
long |
duration() |
long |
end() |
boolean |
equals(Object other) |
int |
hashCode() |
long |
lastActive() |
void |
notifyClients(Object message)
Notifies all clients by sending a message
|
void |
notifyClients(Object message,
ListeningBehaviour listeningBehaviour)
Sends a message to job clients that match the listening behavior
|
void |
notifyNonDetachedClients(Object message)
Notifies all clients which are not of type detached
|
boolean |
sessionAlive() |
long |
sessionTimeout() |
void |
setLastActive() |
long |
start() |
String |
toString() |
public JobInfo(akka.actor.ActorRef client, ListeningBehaviour listeningBehaviour, long start, long sessionTimeout)
public static JobInfo apply(akka.actor.ActorRef client, ListeningBehaviour listeningBehaviour, long start, long sessionTimeout)
public long start()
public long sessionTimeout()
public scala.collection.mutable.HashSet<scala.Tuple2<akka.actor.ActorRef,ListeningBehaviour>> clients()
public boolean sessionAlive()
public long lastActive()
public long end()
public long duration()
public void notifyClients(Object message)
message
- the message to sendpublic void notifyNonDetachedClients(Object message)
message
- the message to sent to non-detached clientspublic void notifyClients(Object message, ListeningBehaviour listeningBehaviour)
message
- the message to send to all clientslisteningBehaviour
- the desired listening behaviourpublic void setLastActive()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.