public static string GetPrettyState(this RoutingShard shard) { if (shard != null) { switch (shard.State) { case ShardStates.Unassigned: return("Unassigned"); case ShardStates.Initializing: return("Initializing"); case ShardStates.Started: return("Started"); case ShardStates.Relocating: return("Relocating"); } } return("Unknown"); }
public static string GetStateDescription(this RoutingShard shard) { if (shard != null) { switch (shard.State) { case ShardStates.Unassigned: return("The shard is not assigned to any node"); case ShardStates.Initializing: return("The shard is initializing (probably recovering from either a peer shard or gateway)"); case ShardStates.Started: return("The shard is started"); case ShardStates.Relocating: return("The shard is in the process being relocated"); } } return("Unknown"); }
public static MonitorStatus GetMonitorStatus(this RoutingShard shard) { if (shard != null) { switch (shard.State) { case ShardStates.Unassigned: return(MonitorStatus.Critical); case ShardStates.Initializing: return(MonitorStatus.Warning); case ShardStates.Started: return(MonitorStatus.Good); case ShardStates.Relocating: return(MonitorStatus.Maintenance); } } return(MonitorStatus.Unknown); }