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); }
public static void RestoreDataFromCache() { RoutingTableStateDescriptor descriptor = Deserialize(); RoutingTable.AddWorkSessionServers(descriptor.Servers); }
public static void UpdateCache() { Serialize(new RoutingTableStateDescriptor(RoutingTable.GetWorkSessionServerInstances())); }
protected override void OnServiceCore() { var workSessionInfos = RoutingTable.GetWorkSessionServerInstances(); WorkSessionMessenger.SendMessage(MessageOperation.Ping, workSessionInfos); }