本文整理汇总了C#中IInternalActorRef类的典型用法代码示例。如果您正苦于以下问题:C# IInternalActorRef类的具体用法?C# IInternalActorRef怎么用?C# IInternalActorRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IInternalActorRef类属于命名空间,在下文中一共展示了IInternalActorRef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RootGuardianActorRef
public RootGuardianActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, Func<Mailbox> createMailbox, //TODO: switch from Func<Mailbox> createMailbox to MailboxType mailboxType
IInternalActorRef supervisor, ActorPath path, IInternalActorRef deadLetters, IReadOnlyDictionary<string, IInternalActorRef> extraNames)
: base(system,props,dispatcher,createMailbox,supervisor,path)
{
_deadLetters = deadLetters;
_extraNames = extraNames;
}
示例2: Message
public Message(IInternalActorRef recipient, Address recipientAddress, SerializedMessage serializedMessage, IActorRef senderOptional = null, SeqNo seq = null)
{
Seq = seq;
SenderOptional = senderOptional;
SerializedMessage = serializedMessage;
RecipientAddress = recipientAddress;
Recipient = recipient;
}
示例3: RepointableActorRef
public RepointableActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, MailboxType mailboxType, IInternalActorRef supervisor, ActorPath path)
{
System = system;
Props = props;
Dispatcher = dispatcher;
MailboxType = mailboxType;
Supervisor = supervisor;
_path = path;
}
示例4: ActorCell
public ActorCell(ActorSystemImpl system, IInternalActorRef self, Props props, MessageDispatcher dispatcher, IInternalActorRef parent)
{
_self = self;
_props = props;
_systemImpl = system;
Parent = parent;
Dispatcher = dispatcher;
}
示例5: RepointableActorRef
public RepointableActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, Func<Mailbox> createMailbox, IInternalActorRef supervisor, ActorPath path)
{
_system = system;
_props = props;
_dispatcher = dispatcher;
_createMailbox = createMailbox;
_supervisor = supervisor;
_path = path;
}
示例6: LocalActorRef
/// <summary>
/// Inheritors should only call this constructor
/// </summary>
internal protected LocalActorRef(ActorSystem system, Props props, MessageDispatcher dispatcher, Func<Mailbox> createMailbox, IInternalActorRef supervisor, ActorPath path, Func<LocalActorRef, ActorCell> createActorCell) //TODO: switch from Func<Mailbox> createMailbox to MailboxType mailboxType
{
_system = system;
_props = props;
_dispatcher = dispatcher;
_createMailbox = createMailbox;
_supervisor = supervisor;
_path = path;
_cell = createActorCell(this);
}
示例7: RemoteActorRef
/// <summary>
/// Initializes a new instance of the <see cref="RemoteActorRef"/> class.
/// </summary>
/// <param name="remote">The remote.</param>
/// <param name="localAddressToUse">The local address to use.</param>
/// <param name="path">The path.</param>
/// <param name="parent">The parent.</param>
/// <param name="props">The props.</param>
/// <param name="deploy">The deploy.</param>
internal RemoteActorRef(RemoteTransport remote, Address localAddressToUse, ActorPath path, IInternalActorRef parent,
Props props, Deploy deploy)
{
Remote = remote;
LocalAddressToUse = localAddressToUse;
_path = path;
_parent = parent;
_props = props;
_deploy = deploy;
}
示例8: ResizablePoolCell
public ResizablePoolCell(ActorSystemImpl system, IInternalActorRef self, Props routerProps, MessageDispatcher dispatcher, Props routeeProps, IInternalActorRef supervisor, Pool pool)
: base(system,self, routerProps,dispatcher, routeeProps, supervisor)
{
if (pool.Resizer == null) throw new ArgumentException("RouterConfig must be a Pool with defined resizer");
resizer = pool.Resizer;
_routerProps = routerProps;
_pool = pool;
_resizeCounter = new AtomicCounterLong(0);
_resizeInProgress = new AtomicBoolean();
}
示例9: RoutedActorCell
public RoutedActorCell(
ActorSystemImpl system,
IInternalActorRef self,
Props routerProps,
MessageDispatcher dispatcher,
Props routeeProps,
IInternalActorRef supervisor)
: base(system, self, routerProps, dispatcher, supervisor)
{
RouteeProps = routeeProps;
RouterConfig = routerProps.RouterConfig;
Router = null;
}
示例10: RoutedActorRef
public RoutedActorRef(
ActorSystemImpl system,
Props routerProps,
MessageDispatcher routerDispatcher,
MailboxType routerMailbox,
Props routeeProps,
IInternalActorRef supervisor,
ActorPath path)
: base(system, routerProps, routerDispatcher, routerMailbox, supervisor, path)
{
_routeeProps = routeeProps;
routerProps.RouterConfig.VerifyConfig(path);
}
示例11: LocalActorRef
//This mimics what's done in Akka`s construction of an LocalActorRef.
//The actorCell is created in the overridable newActorCell() during creation of the instance.
//Since we don't want calls to virtual members in C# we must supply it.
//
//This is the code from Akka:
// private[akka] class LocalActorRef private[akka] (
// _system: ActorSystemImpl,
// _props: Props,
// _dispatcher: MessageDispatcher,
// _mailboxType: MailboxType,
// _supervisor: InternalActorRef,
// override val path: ActorPath) extends ActorRefWithCell with LocalRef {
// private val actorCell: ActorCell = newActorCell(_system, this, _props, _dispatcher, _supervisor)
// actorCell.init(sendSupervise = true, _mailboxType)
// ...
// }
public LocalActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, MailboxType mailboxType, IInternalActorRef supervisor, ActorPath path)
{
_system = system;
_props = props;
_dispatcher = dispatcher;
MailboxType = mailboxType;
_supervisor = supervisor;
_path = path;
/*
* Safe publication of this class’s fields is guaranteed by Mailbox.SetActor()
* which is called indirectly from ActorCell.init() (if you’re wondering why
* this is at all important, remember that under the CLR readonly fields are only
* frozen at the _end_ of the constructor, but we are publishing “this” before
* that is reached).
* This means that the result of NewActorCell needs to be written to the field
* _cell before we call init and start, since we can start using "this"
* object from another thread as soon as we run init.
*/
// ReSharper disable once VirtualMemberCallInContructor
_cell = NewActorCell(_system, this, _props, _dispatcher, _supervisor); // _cell needs to be assigned before Init is called.
_cell.Init(true, MailboxType);
}
示例12: SendTerminated
private void SendTerminated(bool ifLocal, IInternalActorRef watcher)
{
if (((IActorRefScope)watcher).IsLocal == ifLocal && !watcher.Equals(Parent))
{
watcher.SendSystemMessage(new DeathWatchNotification(Self, true, false));
}
}
示例13: ChildRestartStats
public ChildRestartStats(IInternalActorRef child, uint maxNrOfRetriesCount = 0, long restartTimeWindowStartTicks = 0)
{
_child = child;
_maxNrOfRetriesCount = maxNrOfRetriesCount;
_restartTimeWindowStartTicks = restartTimeWindowStartTicks;
}
示例14: TestActorCell
public TestActorCell(ActorSystemImpl system, IInternalActorRef self, Props props, MessageDispatcher dispatcher, IInternalActorRef parent)
: base(system, self, props, dispatcher, parent)
{
}
示例15: SetTempContainer
public void SetTempContainer(IInternalActorRef tempContainer)
{
_tempContainer = tempContainer;
}