Method GetCacheClients
GetCacheClients(String, CacheConnection)
Gets 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<ServerNode, System.Collections.Generic.List<ClientInfo>> | Key value pair of ServerNode and list of 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);