DataCache.AddFailureNotificationCallback Method

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Adds a failure notification callback, for notifications indicating that a client has missed one or more cache notifications.

Namespace: Microsoft.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Overridable Function AddFailureNotificationCallback ( _
    failureCallback As DataCacheFailureNotificationCallback _
) As DataCacheNotificationDescriptor
'Usage
Dim instance As DataCache
Dim failureCallback As DataCacheFailureNotificationCallback
Dim returnValue As DataCacheNotificationDescriptor

returnValue = instance.AddFailureNotificationCallback(failureCallback)
public virtual DataCacheNotificationDescriptor AddFailureNotificationCallback (
    DataCacheFailureNotificationCallback failureCallback
)
public:
virtual DataCacheNotificationDescriptor^ AddFailureNotificationCallback (
    DataCacheFailureNotificationCallback^ failureCallback
)
public DataCacheNotificationDescriptor AddFailureNotificationCallback (
    DataCacheFailureNotificationCallback failureCallback
)
public function AddFailureNotificationCallback (
    failureCallback : DataCacheFailureNotificationCallback
) : DataCacheNotificationDescriptor

Parameters

  • failureCallback
    The name of the method that you want to invoke when the failure notification occurs.

Return Value

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.

For more information about using this method, see How to: Add a Failure Notification Callback (Velocity). For more information about cache notifications, see Cache Notifications (Velocity).

Note

In order for your application to use notifications, you need to enable them on a named cache. Use the notificationsEnabled parameter with the New-Cache or Set-CacheConfig commands. For more information, see Cache Administration with PowerShell (Velocity).

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace