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);
        }