Method GetCacheClients
GetCacheClients(String, CacheConnection)
Get information of clients connected to each server node in a cache.
Declaration
public static Dictionary<ServerNode, List<ClientInfo>> GetCacheClients(string cacheName, CacheConnection connection = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | The identifier for the ICache. |
CacheConnection | connection | CacheConnection parameters for connection to Cache. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Alachisoft.NCache.Runtime.CacheManagement.ServerNode, System.Collections.Generic.List<Alachisoft.NCache.Runtime.Caching.ClientInfo>> | Key value pair of Alachisoft.NCache.Runtime.CacheManagement.ServerNode and list of Alachisoft.NCache.Runtime.Caching.ClientInfo in a cache. |
Examples
The following example shows how to get connected clients to each server node in a cache.
CacheConnection cacheConnection = new CacheConnection("remoteServer", 8250);
cacheConnection.UserCredentials = new Credentials("domain\\user-id", "password");
Dictionary<ServerNode, List<Alachisoft.NCache.Runtime.Caching.ClientInfo> info = CacheManager.GetCacheClients("demoCache", cacheConnection);