DataCache.AddFailureNotificationCallback Method (DataCacheFailureNotificationCallback)
Adds a failure notification callback, for notifications indicating that a client has missed one or more cache notifications. Not supported in Windows Azure Shared Caching.
Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)
Syntax
public DataCacheNotificationDescriptor AddFailureNotificationCallback(
DataCacheFailureNotificationCallback failureCallback
)
public:
DataCacheNotificationDescriptor^ AddFailureNotificationCallback(
DataCacheFailureNotificationCallback^ failureCallback
)
member AddFailureNotificationCallback :
failureCallback:DataCacheFailureNotificationCallback -> DataCacheNotificationDescriptor
Public Function AddFailureNotificationCallback (
failureCallback As DataCacheFailureNotificationCallback
) As DataCacheNotificationDescriptor
Parameters
failureCallback
Type: Microsoft.ApplicationServer.Caching.DataCacheFailureNotificationCallbackThe name of the method that you want to invoke when the failure notification occurs.
Return Value
Type: Microsoft.ApplicationServer.Caching.DataCacheNotificationDescriptor
A DataCacheNotificationDescriptor object used to identify the cache notification callback.
Remarks
The failureCallback method you invoke with the failure notification must accept the same parameters as the DataCacheFailureNotificationCallback delegate.
Note
In order for your application to use notifications, you need to enable them on a named cache. For Windows Server AppFabric Caching, use the NotificationsEnabled parameter with the New-Cache or Set-CacheConfig Windows PowerShell commands. For Windows Azure Caching on roles, enable notifications in the cache settings.
See Also
DataCache Class
Microsoft.ApplicationServer.Caching Namespace
Return to top