ProcessActor

s2a.leucine.actors.ProcessActor
transparent trait ProcessActor(using context: ActorContext) extends StatusActor

The ProcessActor implements process methods that convey this actor.

Attributes

Graph
Supertypes
trait UserActor
trait Actor
class Object
trait Matchable
class Any
Known subtypes
class BareActor
class BasicActor[ML]
class StandardActor[ML, SD]
class StateActor[ML, SD, AS]

Members list

Concise view

Type members

Inherited classlikes

trait StashOps

Attributes

Inherited from:
StashDefs (hidden)
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Stash.type

Inherited types

type Sender <: Actor

All actors that may send messages to this actor. Note, you may always send a message to yourself.

All actors that may send messages to this actor. Note, you may always send a message to yourself.

Attributes

Inherited from:
ActorDefs (hidden)

Value members

Inherited methods

See the current activity state of this actor

See the current activity state of this actor

Attributes

Inherited from:
StatusActor
protected def maxMailboxSize: Int

The maximum number of letters this actor accepts. Override to change its value.

The maximum number of letters this actor accepts. Override to change its value.

Attributes

Inherited from:
UserActor
def name: String

The name of this actor.

The name of this actor.

Attributes

Inherited from:
ActorDefs (hidden)
def path: String

The fullname of this actor, contains the full path to the first ancestor.

The fullname of this actor, contains the full path to the first ancestor.

Attributes

Inherited from:
ActorDefs (hidden)
def stop(value: Stop): Unit

Method to inform the actor to stop its activities directly, or later, depening on the circumstances. Can be called from outside and inside the actor, since the method it is thread safe. The possible values are (part of the enum Actor.Stop) : Direct: Stop the actor asap, but complete the running letter. Subsequently stop all children likewise. Terminate afterwards. Finish: The mailbox is finished, but no more letters are accepted. Subsequently finish all children likewise. Terminate afterwards. Barren: Wait until all children have stopped, if present, and finish directly afterwards. Silent: Wait until the actor and all children, if present, are silent for some time, then stop directly. Final: This actor may be terminated if all other non final actors are terminated by themselves. Never: This actor never stops, this is the default setting. Whereas Direct stops an actor family immediately, Finish allows for a smooth teardown of the whole family tree. Note that in both cases is not possible for childeren to send results back to the parent. To that end, Barren or Silent are the better choice. Silent is also used for actors that wait on external events, but when they do not arrive, the actor is able to stop itself. Lastly, Final is meant for services like logging. They should always be available, but when there are not actors around anymore to send logs, the logger may be closed by the system itself. Once set, the levels Direct and Finish are irrevocable. The other levels can be reset to Never as long as the condition to stop the actor did not kick in.

Method to inform the actor to stop its activities directly, or later, depening on the circumstances. Can be called from outside and inside the actor, since the method it is thread safe. The possible values are (part of the enum Actor.Stop) : Direct: Stop the actor asap, but complete the running letter. Subsequently stop all children likewise. Terminate afterwards. Finish: The mailbox is finished, but no more letters are accepted. Subsequently finish all children likewise. Terminate afterwards. Barren: Wait until all children have stopped, if present, and finish directly afterwards. Silent: Wait until the actor and all children, if present, are silent for some time, then stop directly. Final: This actor may be terminated if all other non final actors are terminated by themselves. Never: This actor never stops, this is the default setting. Whereas Direct stops an actor family immediately, Finish allows for a smooth teardown of the whole family tree. Note that in both cases is not possible for childeren to send results back to the parent. To that end, Barren or Silent are the better choice. Silent is also used for actors that wait on external events, but when they do not arrive, the actor is able to stop itself. Lastly, Final is meant for services like logging. They should always be available, but when there are not actors around anymore to send logs, the logger may be closed by the system itself. Once set, the levels Direct and Finish are irrevocable. The other levels can be reset to Never as long as the condition to stop the actor did not kick in.

Attributes

Inherited from:
Actor
protected def stopped(cause: Stop, complete: Boolean): Unit

Called before actor deactivation and guaranteed after the last message is processed. If there were any unprocessed letters in this actor at teardown, complete is false. These could be in the normal mailbox or on the stash, if present. Cause returns the last stop mode, so the cause of stopping this actor is known. In case of a actorContext shutdown this is NOT called, for this disruptly terminates the processing loops. It is however called when stop(...) is used, or when the actor is shutdown by a parent. The actor may still be around after this method is called, but will never accept new messages. The parent is still defined, when stopped() is executed (but may already stopped processing messages) but all the childeren will already be removed from the list, and their stopped() methods have already been called.

Called before actor deactivation and guaranteed after the last message is processed. If there were any unprocessed letters in this actor at teardown, complete is false. These could be in the normal mailbox or on the stash, if present. Cause returns the last stop mode, so the cause of stopping this actor is known. In case of a actorContext shutdown this is NOT called, for this disruptly terminates the processing loops. It is however called when stop(...) is used, or when the actor is shutdown by a parent. The actor may still be around after this method is called, but will never accept new messages. The parent is still defined, when stopped() is executed (but may already stopped processing messages) but all the childeren will already be removed from the list, and their stopped() methods have already been called.

Attributes

Inherited from:
UserActor