Delegate CacheClientConnectivityChangedCallback
Defines a callback method for notifying the application about the status of cache client connectivity.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public delegate void CacheClientConnectivityChangedCallback(string cacheId, ClientInfo client);
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheId | Name of the Cache. |
Alachisoft.NCache.Runtime.Caching.ClientInfo | client | Information about Cache Client. |
Examples
The following example demonstrates how to use the CacheClientConnectivityChangedCallback class to notify an application when there is change in client connectivity of the cache.
public void OnCacheClientConnectivityChanged(string cacheId, ClientInfo client)
{
// ...
}
protected void Application_Start(object sender, EventArgs e)
{
try
{
ICache cache = CacheManager.GetCache("demoClusteredCache");
cache.NotificationService.CacheClientConnectivityChanged += new CacheClientConnectivityChangedCallback(this.OnCacheClientConnectivityChanged);
}
catch (Exception ex)
{
}
}