Ejemplo n.º 1
0
        public static async Task KillProcessManager <TProcess, TState>(this GridDomainNode node, string id, TimeSpan?timeout = null)
            where TState : IProcessState
        {
            var hub = await node.LookupProcessHubActor <TProcess>(timeout);

            IActorRef processActor;

            try
            {
                processActor = await node.LookupProcessActor <TProcess, TState>(id, timeout);
            }
            catch
            {
                return;
            }

            await ShutDownHubActor(node, id, processActor, hub, timeout);

            var processStateHubActor = await node.ResolveActor($"{typeof(TState).Name}_Hub", timeout);

            var processStateActor = await node.ResolveActor($"{typeof(TState).Name}_Hub/" + EntityActorName.New <ProcessStateAggregate <TState> >(id), timeout);

            await ShutDownHubActor(node, id, processStateActor, processStateHubActor, timeout);
        }
Ejemplo n.º 2
0
        public static async Task <WarmUpResult> WarmUpProcessManager <TProcess>(this GridDomainNode node, string id, TimeSpan?timeout = null)
        {
            var processHub = await node.LookupProcessHubActor <TProcess>(timeout);

            return(await processHub.Ask <WarmUpResult>(new WarmUpChild(id)));
        }