Class RepointableActorRef
A reference to an actor that can be "repointed" to different actor cells during initialization. This is used for actors whose underlying implementation can change during startup.
Implements
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public class RepointableActorRef : ActorRefWithCell, IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable, IRepointableRef
Constructors
| Edit this page View SourceRepointableActorRef(ActorSystemImpl, Props, MessageDispatcher, MailboxType, IInternalActorRef, ActorPath)
Creates a new RepointableActorRef with the specified parameters.
Declaration
public RepointableActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, MailboxType mailboxType, IInternalActorRef supervisor, ActorPath path)
Parameters
Type | Name | Description |
---|---|---|
ActorSystemImpl | system | The actor system that owns this actor reference. |
Props | props | The props used to create the actor. |
MessageDispatcher | dispatcher | The message dispatcher used by this actor. |
MailboxType | mailboxType | The mailbox type used by this actor. |
IInternalActorRef | supervisor | The supervisor of this actor. |
ActorPath | path | The actor path of this actor. |
Fields
| Edit this page View SourceDispatcher
The message dispatcher used by this actor.
Declaration
protected readonly MessageDispatcher Dispatcher
Field Value
Type | Description |
---|---|
MessageDispatcher |
Props
The props used to create the actor.
Declaration
protected readonly Props Props
Field Value
Type | Description |
---|---|
Props |
Supervisor
The supervisor of this actor.
Declaration
protected readonly IInternalActorRef Supervisor
Field Value
Type | Description |
---|---|
IInternalActorRef |
System
The actor system that owns this actor reference.
Declaration
protected readonly ActorSystemImpl System
Field Value
Type | Description |
---|---|
ActorSystemImpl |
_path
The actor path of this actor.
Declaration
protected readonly ActorPath _path
Field Value
Type | Description |
---|---|
ActorPath |
Properties
| Edit this page View SourceChildren
Gets an enumeration of all child actors.
Declaration
public override IEnumerable<IActorRef> Children { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IActorRef> |
Overrides
IsLocal
INTERNAL API.
Used by built-in IActorRef implementations for handling internal operations that are not exposed directly to end-users.
Declaration
public override bool IsLocal { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
IsStarted
Indicates whether this actor has been started and is no longer an UnstartedCell.
Declaration
public bool IsStarted { get; }
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
IllegalStateException | This exception is thrown if this property is called before actor is initialized (Initialize(bool)). |
IsTerminated
Indicates whether this actor reference is terminated.
Declaration
public override bool IsTerminated { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Lookup
Gets the lookup cell for this actor reference, which is used for child lookup operations.
Declaration
public ICell Lookup { get; }
Property Value
Type | Description |
---|---|
ICell |
Parent
INTERNAL API.
Used by built-in IActorRef implementations for handling internal operations that are not exposed directly to end-users.
Declaration
public override IInternalActorRef Parent { get; }
Property Value
Type | Description |
---|---|
IInternalActorRef |
Overrides
Path
Gets the path of this actor reference.
Declaration
public override ActorPath Path { get; }
Property Value
Type | Description |
---|---|
ActorPath |
Overrides
| Edit this page View SourceProvider
INTERNAL API.
Used by built-in IActorRef implementations for handling internal operations that are not exposed directly to end-users.
Declaration
public override IActorRefProvider Provider { get; }
Property Value
Type | Description |
---|---|
IActorRefProvider |
Overrides
Underlying
Gets the underlying cell for this actor reference.
Declaration
public override ICell Underlying { get; }
Property Value
Type | Description |
---|---|
ICell |
Overrides
Methods
| Edit this page View SourceGetChild(IReadOnlyList<string>)
Retrieves a child actor by path elements.
Declaration
public override IActorRef GetChild(IReadOnlyList<string> name)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<string> | name | The path elements to the child. |
Returns
Type | Description |
---|---|
IActorRef | The child actor reference, or Nobody if no match is found. |
Overrides
| Edit this page View SourceGetSingleChild(string)
Gets a single child actor by name.
Declaration
public override IInternalActorRef GetSingleChild(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the child. |
Returns
Type | Description |
---|---|
IInternalActorRef | The child actor reference, or Nobody if no match is found. |
Overrides
| Edit this page View SourceInitialize(bool)
Initialize: make a dummy cell which holds just a mailbox, then tell our supervisor that we exist so that he can create the real Cell in handleSupervise().
Declaration
public RepointableActorRef Initialize(bool async)
Parameters
Type | Name | Description |
---|---|---|
bool | async | Whether to initialize asynchronously or synchronously. |
Returns
Type | Description |
---|---|
RepointableActorRef | This actor reference for fluent chaining. |
Exceptions
Type | Condition |
---|---|
IllegalStateException | This exception is thrown if this function is called more than once. |
NewCell()
Creates a new ActorCell for this actor reference.
Declaration
protected virtual ActorCell NewCell()
Returns
Type | Description |
---|---|
ActorCell | The created ActorCell. |
Point()
This method is supposed to be called by the supervisor in HandleSupervise()
to replace the UnstartedCell with the real one. It assumes no concurrent
modification of the underlying
field, though it is safe to send messages
at any time.
Declaration
public void Point()
Exceptions
Type | Condition |
---|---|
IllegalStateException | This exception is thrown if the underlying cell is undefined. |
Restart(Exception)
Restarts the actor by sending a Recreate system message with the specified cause.
Declaration
public override void Restart(Exception cause)
Parameters
Type | Name | Description |
---|---|---|
Exception | cause | The exception that caused the restart. |
Overrides
| Edit this page View SourceResume(Exception)
Resumes the actor after being suspended.
Declaration
public override void Resume(Exception causedByFailure = null)
Parameters
Type | Name | Description |
---|---|---|
Exception | causedByFailure | The exception that caused the actor to be suspended, if any. |
Overrides
| Edit this page View SourceSendSystemMessage(ISystemMessage)
Sends a system message to the underlying actor cell.
Declaration
public override void SendSystemMessage(ISystemMessage message)
Parameters
Type | Name | Description |
---|---|---|
ISystemMessage | message | The system message to send. |
Overrides
| Edit this page View SourceStart()
INTERNAL API.
Used by built-in IActorRef implementations for handling internal operations that are not exposed directly to end-users.
Declaration
public override void Start()
Overrides
Stop()
Stops the actor by sending a Terminate system message.
Declaration
public override void Stop()
Overrides
Suspend()
Suspends the actor temporarily by sending a Suspend system message.
Declaration
public override void Suspend()
Overrides
SwapUnderlying(ICell)
Swaps the underlying cell of this actor reference with the provided cell.
Declaration
public void SwapUnderlying(ICell cell)
Parameters
Type | Name | Description |
---|---|---|
ICell | cell | The new cell to use. |
TellInternal(object, IActorRef)
Sends a message to the underlying actor.
Declaration
protected override void TellInternal(object message, IActorRef sender)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message to send. |
IActorRef | sender | The sender of the message. |