public void StopCachesOnNode(ArrayList cacheName) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.StopCachesOnNode); command.Parameters.AddParameter(cacheName); ExecuteCommandOnCacehServer(command); }
public void GarbageCollect(bool block, bool isCompactLOH) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GarbageCollect); command.Parameters.AddParameter(block); command.Parameters.AddParameter(isCompactLOH); ExecuteCommandOnCacehServer(command); }
public List <Address> GetConfClusterServers(string cluster) { ManagementCommand command = GetManagementCommand(ConfigurationCommandUtil.MethodName.GetConfClusterServers); command.Parameters.AddParameter(cluster); return(ExecuteCommandOnMgtServer(command, true) as List <Address>); }
public void ClearCacheContent(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.ClearCacheContent); command.Parameters.AddParameter(cacheId); ExecuteCommandOnCacehServer(command); }
public void BalanceDataloadOnCache(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.BalanceDataloadOnCache); command.Parameters.AddParameter(cacheId); ExecuteCommandOnCacehServer(command); }
public ClientNodeStatusWrapper GetClientNodeStatus(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetClientNodeStatus); command.Parameters.AddParameter(cacheId); return (ClientNodeStatusWrapper)ExecuteCommandOnCacehServer(command); }
/// <summary> /// Checks if the current cache is a Cluster cache or not, used in NCache UnReg cache tool as now UnReg is only applicable to cluster caches only /// </summary> /// <returns>true if Cluster Cache</returns> public CacheStatusOnServerContainer IsClusteredCache(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.IsClusteredCache); command.Parameters.AddParameter(cacheId); return (CacheStatusOnServerContainer)ExecuteCommandOnCacehServer(command); }
public string GetCacheName(int port) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheName); command.Parameters.AddParameter(port); return(((string)ExecuteCommandOnCacehServer(command)).ToLower()); }
public ConfigurationVersion GetConfigurationVersion(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetConfigurationVersion, 1); command.Parameters.AddParameter(cacheId); return((ConfigurationVersion)ExecuteCommandOnCacehServer(command)); }
public List <ClientProcessStats> GetClientProcessStats(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetClientProcessStats); command.Parameters.AddParameter(cacheId); return(ExecuteCommandOnCacehServer(command) as List <ClientProcessStats>); }
public Caching.Cache GetCache(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCache); command.Parameters.AddParameter(cacheId); return((Caching.Cache)ExecuteCommandOnCacehServer(command)); }
public List <Common.Monitoring.ClientNode> GetCacheClients(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheClients); command.Parameters.AddParameter(cacheId); return(ExecuteCommandOnCacehServer(command) as List <Common.Monitoring.ClientNode>); }
public Alachisoft.NCache.Caching.Statistics.CacheStatistics GetCacheStatistics2(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheStatistics2); command.Parameters.AddParameter(cacheId); return((Alachisoft.NCache.Caching.Statistics.CacheStatistics)ExecuteCommandOnCacehServer(command)); }
public CacheNodeStatistics[] GetCacheStatistics(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheStatistics); command.Parameters.AddParameter(cacheId); return((CacheNodeStatistics[])ExecuteCommandOnCacehServer(command)); }
public void RemoveCacheFromClientConfig(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.RemoveCacheFromClientConfig); command.Parameters.AddParameter(cacheId); ExecuteCommandOnCacehServer(command); }
public Dictionary <string, TopicStats> GetTopicStats(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetTopicStats); command.Parameters.AddParameter(cacheId); return(ExecuteCommandOnCacehServer(command) as Dictionary <string, TopicStats>); }
public ClientConfiguration.Dom.ClientConfiguration GetClientConfiguration(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetClientConfiguration); command.Parameters.AddParameter(cacheId); return ExecuteCommandOnCacehServer(command) as ClientConfiguration.Dom.ClientConfiguration; }
public int GetCacheProcessID(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheProcessID, 1); command.Parameters.AddParameter(cacheId); return((int)ExecuteCommandOnCacehServer(command)); }
public void BindToIP(BindedIpMap bindIPMap) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.BindToIP); command.Parameters.AddParameter(bindIPMap); ExecuteCommandOnCacehServer(command); }
private ManagementCommand GetManagementCommand(string method, int overload) { ManagementCommand command = new ManagementCommand(); command.methodName = method; command.overload = overload; command.objectName = ManagementUtil.ManagementObjectName.CacheServer; if (!string.IsNullOrEmpty(Source)) { if (Source.ToLower() == "manager") { command.source = ManagementCommand.SourceType.MANAGER; } else if (Source.ToLower() == "monitor") { command.source = ManagementCommand.SourceType.MONITOR; } else { command.source = ManagementCommand.SourceType.TOOL; } } else { command.source = ManagementCommand.SourceType.TOOL; } return(command); }
/// <summary> /// Checks whether the specified port is available (non-conflicting) or not /// </summary> /// <param name="port">Cluster port</param> /// <returns>'true' if the port is available, otherwise 'flase'</returns> public bool PortIsAvailable(int port) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.PortIsAvailable); command.Parameters.AddParameter(port); return (bool)ExecuteCommandOnCacehServer(command); }
public void Deserialize(Common.Serialization.IO.CompactReader reader) { Type = (ReplicationType)reader.ReadInt32(); Configuration = reader.ReadObject() as ClusterConfiguration; Metadata = reader.ReadObject() as ClusterInfo; Command = reader.ReadObject() as ManagementCommand; }
public void SetLocalCacheIP(string ip) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.SetLocalCacheIP); command.Parameters.AddParameter(ip); ExecuteCommandOnCacehServer(command); }
public IDictionary GetCacheProps() { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheProps); return ExecuteCommandOnCacehServer(command) as IDictionary; }
public bool IsCacheRegistered(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.IsCacheRegistered); command.Parameters.AddParameter(cacheId); return (bool)ExecuteCommandOnCacehServer(command); }
public CacheInfo GetCacheInfo(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.GetCacheInfo); command.Parameters.AddParameter(cacheId); return ExecuteCommandOnCacehServer(command) as CacheInfo; }
public void Run() { inventoryCmd = new InventoryCommand(); managementCmd = new ManagementCommand(); PrintWelcome(); RequestCommand(); }
public string CanApplyHotConfiguration(string cacheId, CacheServerConfig config) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.CanApplyHotConfig); command.Parameters.AddParameter(cacheId); command.Parameters.AddParameter(config); return ExecuteCommandOnCacehServer(command) as string; }
public object OnRequest(IRequest request) { if (request.Message is ManagementCommand) { ManagementCommand command = request.Message as ManagementCommand; if (command == null) { return(null); } ManagementResponse response = new ManagementResponse(); response.MethodName = command.MethodName; response.Version = command.CommandVersion; response.RequestId = command.RequestId; byte[] arguments = CompactBinaryFormatter.ToByteBuffer(command.Parameters, null); try { response.ResponseMessage = _rpcService.InvokeMethodOnTarget(command.MethodName, command.Overload, GetTargetMethodParameters(arguments)); } catch (System.Exception ex) { response.Exception = ex; } return(response); } else { return(null); } }
public void StopCacheOnCacheHost(string cacheId) { ManagementCommand command = GetManagementCommand(ManagementUtil.MethodName.StopCacheOnHost, 1); command.Parameters.AddParameter(cacheId); ExecuteCommandOnCacehServer(command); }