Delegate CacheClientConnectivityChangedCallback
Defines a callback method for notifying the application about the status of the cache client connectivity.
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. |
ClientInfo | client | Information about the cache client. |
Examples
The following example demonstrates how to use the CacheClientConnectivityChangedCallback class to notify an application when there is a change in the 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)
{
}
}