static void Add(Message msg)
 {
     RoutingTable.AddWorkSession(msg);
 }
 static void Remove(Message msg)
 {
     RoutingTable.RemoveWorkSession(msg);
 }
 static void GetServerStateFromMessage(Message msg)
 {
     RoutingTable.GetWorkSessionServerStateFromMessage(msg);
 }
 private static void UnregisterServer(Message msg)
 {
     RoutingTable.RemoveWorkSessionServer(msg.Sender);
 }
        private static void ServerNumberDecreased(Message msg)
        {
            List <WorkSessionServerInfo> affectedServers = msg.RegisteredServers.Where(s => s.RoleInstanceId != msg.Sender.RoleInstanceId).ToList();

            RoutingTable.RaiseServerNumberDecreased(affectedServers);
        }
 static void ChangeStatus(Message msg)
 {
     RoutingTable.ChangeWorkSessionStatus(msg);
 }
Пример #7
0
        public static void RestoreDataFromCache()
        {
            RoutingTableStateDescriptor descriptor = Deserialize();

            RoutingTable.AddWorkSessionServers(descriptor.Servers);
        }
Пример #8
0
 public static void UpdateCache()
 {
     Serialize(new RoutingTableStateDescriptor(RoutingTable.GetWorkSessionServerInstances()));
 }
Пример #9
0
        protected override void OnServiceCore()
        {
            var workSessionInfos = RoutingTable.GetWorkSessionServerInstances();

            WorkSessionMessenger.SendMessage(MessageOperation.Ping, workSessionInfos);
        }