public Unit Tell(object message, Schedule schedule, ProcessId sender, string inbox, Message.Type type, Message.TagSpec tag) =>
 schedule == Schedule.Immediate
         ? transactionalIO
             ? TellNoIO(message, sender, inbox, type, tag)
             : ProcessOp.IO(() => TellNoIO(message, sender, inbox, type, tag))
         : schedule.Type == Schedule.PersistenceType.Ephemeral
             ? LocalScheduler.Push(schedule, ProcessId, m => TellNoIO(m, sender, inbox, type, tag), message)
             : DoSchedule(message, schedule, sender, type, tag);
Esempio n. 2
0
        public Unit TellUserControl(UserControlMessage message, ProcessId sender)
        {
            var sessionId = ActorContext.SessionId;

            return(transactionalIO
                ? ProcessOp.IO(() => Inbox.TellUserControl(message, sessionId))
                : Inbox.TellUserControl(message, sessionId));
        }
 public Unit TellSystem(SystemMessage message, ProcessId sender) =>
 transactionalIO
         ? ignore(Cluster.PublishToChannel(
                      ActorInboxCommon.ClusterSystemInboxNotifyKey(ProcessId),
                      RemoteMessageDTO.Create(message, ProcessId, sender, Message.Type.System, message.Tag, SessionId, 0)))
         : ProcessOp.IO(() =>
 {
     var clientsReached = Cluster.PublishToChannel(
         ActorInboxCommon.ClusterSystemInboxNotifyKey(ProcessId),
         RemoteMessageDTO.Create(message, ProcessId, sender, Message.Type.System, message.Tag, SessionId, 0));
     return(unit);
 });
 public Unit Watch(ProcessId pid) =>
 transactionalIO
         ? ProcessOp.IO(() => Actor.AddWatcher(pid))
         : Actor.AddWatcher(pid);
 public Unit Publish(object message) =>
 transactionalIO
         ? ProcessOp.IO(() => Actor.Publish(message))
         : Actor.Publish(message);
 public Unit Shutdown() =>
 transactionalIO
         ? ProcessOp.IO(() => ShutdownProcess(true))
         : ShutdownProcess(true);
 public Unit Kill() =>
 transactionalIO
         ? ProcessOp.IO(() => ShutdownProcess(false))
         : ShutdownProcess(false);
 public Unit TellUserControl(UserControlMessage message, ProcessId sender) =>
 transactionalIO
         ? ProcessOp.IO(() => Inbox.TellUserControl(message))
         : Inbox.TellUserControl(message);
 public Unit TellSystem(SystemMessage message, ProcessId sender) =>
 transactionalIO
         ? ProcessOp.IO(() => Inbox.TellSystem(message))
         : Inbox.TellSystem(message);
 public Unit Tell(object message, ProcessId sender, Message.TagSpec tag) =>
 transactionalIO
         ? Inbox.Tell(Inbox.ValidateMessageType(message, sender), sender)
         : ProcessOp.IO(() => Inbox.Tell(Inbox.ValidateMessageType(message, sender), sender));
 public Unit DispatchUnWatch(ProcessId watching) =>
 transactionalIO
         ? ProcessOp.IO(() => Actor.DispatchUnWatch(watching))
         : Actor.DispatchUnWatch(watching);
 public Unit UnWatch(ProcessId pid) =>
 transactionalIO
         ? ProcessOp.IO(() => Actor.RemoveWatcher(pid))
         : Actor.RemoveWatcher(pid);
 public Unit Publish(object message) =>
 transactionalIO
         ? ignore(Cluster.PublishToChannel(ActorInboxCommon.ClusterPubSubKey(ProcessId), message))
         : ProcessOp.IO(() => Cluster.PublishToChannel(ActorInboxCommon.ClusterPubSubKey(ProcessId), message));
 Unit DoSchedule(object message, Schedule schedule, ProcessId sender, Message.Type type, Message.TagSpec tag) =>
 transactionalIO
         ? DoScheduleNoIO(message, sender, schedule, type, tag)
         : ProcessOp.IO(() => DoScheduleNoIO(message, sender, schedule, type, tag));
Esempio n. 15
0
 public Unit Tell(object message, ProcessId sender, string inbox, Message.Type type, Message.TagSpec tag) =>
 transactionalIO
         ? TellNoIO(message, sender, inbox, type, tag)
         : ProcessOp.IO(() => TellNoIO(message, sender, inbox, type, tag));