Delegate DataTypeDataNotificationCallback
Defines a callback method for notifying applications when a distributed collection is updated in the cache.
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public delegate void DataTypeDataNotificationCallback(string collectionName, DataTypeEventArg collectionEventArgs);
Parameters
Type | Name | Description |
---|---|---|
System. |
collectionName | The name of collection used to reference it. |
Data |
collectionEventArgs | The collection event arguments. |
Remarks
Since this handler is invoked every time a distributed collection is updated in the cache, doing a lot of processing inside the handler might have an impact on the performance of the cache and cluster. It is therefore, advisable to do minimal processing inside the handler.
Examples
The following example demonstrates how to use the Data
public static void OnCollectionDataModification(string collectionName, CollectionEventArg collectionEventArgs)
{
//
}
protected void Application_Start(object sender, EventArgs e)
{
try
{
NCache.InitializeCache("demoClusteredCache");
CollectionDataNotificationCallback callback = new CollectionDataNotificationCallback(OnCacheDataModification);
}
catch(Exception e)
{
}
}