public bool ApplyCacheConfiguration(string cacheId, Config.NewDom.CacheServerConfig props, bool hotApply) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.ApplyCacheConfiguration, 2); command.Parameters.AddParameter(cacheId); command.Parameters.AddParameter(props); command.Parameters.AddParameter(hotApply); return (bool)ExecuteCommandOnCacehServer(command); }
public bool RegisterCache(string cacheId, Config.NewDom.CacheServerConfig config, string partId, bool overwrite, bool hotApply) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.RegisterCache, 4); command.Parameters.AddParameter(cacheId); command.Parameters.AddParameter(config); command.Parameters.AddParameter(partId); command.Parameters.AddParameter(overwrite); command.Parameters.AddParameter(hotApply); return (bool)ExecuteCommandOnCacehServer(command); }
SortedDictionary <string, string[]> FetchCounters(List <ICacheServer> cacheClients) { SortedDictionary <string, string[]> counters = new SortedDictionary <string, string[]>(); for (int i = 0; i < cacheClients.Count; i++) { if (cacheClients[i] != null) { Config.NewDom.CacheServerConfig config = cacheClients[i].GetNewConfiguration(CacheName); _perfmonCounters = cacheClients[i].GetPerfmonValues(_perfmonCounters, CacheName); if (i == 0) { foreach (var counter in _perfmonCounters) { counters.Add(counter.Counter, new string[(cacheClients.Count)]); } } foreach (var counter in _perfmonCounters) { if (counter.Value != -404 && counter.Value != -10) { counters[counter.Counter][i] = string.Format("{0:0.000}", counter.Value); } else { counters[counter.Counter][i] = "--"; } } } else { if (i == 0) { foreach (var counter in _perfmonCounters) { counters.Add(counter.Counter, new string[(cacheClients.Count)]); } } foreach (var counter in _perfmonCounters) { counters[counter.Counter][i] = "--"; } } } return(counters); }