Table of Contents

Method SetExpirationHandler

Namespace
Scaleout.Client
Assembly
Scaleout.Client.dll

SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, ExpirationType, Task<ObjectDisposition>>)

Sets an async callback method for handling expiration events and notifies the ScaleOut service that this client application is available to handle events for the supplied cache instance.

public static void SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, ExpirationType, Task<ObjectDisposition>> asyncCallback)

Parameters

cache Cache<TKey, TValue>

The cache that will push expiration events.

asyncCallback Func<TKey, ExpirationType, Task<ObjectDisposition>>

Callback that is invoked when an object expires in the ScaleOut service.

Type Parameters

TKey

The type of keys in the cache.

TValue

The type of values in the cache.

SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue>, Func<TKey, ExpirationType, ObjectDisposition>)

Sets a callback method for handling expiration events and notifies the ScaleOut service that this client application is available to handle events for the supplied cache instance.

public static void SetExpirationHandler<TKey, TValue>(Cache<TKey, TValue> cache, Func<TKey, ExpirationType, ObjectDisposition> callback)

Parameters

cache Cache<TKey, TValue>

The cache that will push expiration events.

callback Func<TKey, ExpirationType, ObjectDisposition>

Callback that is invoked when an object expires in the ScaleOut service.

Type Parameters

TKey

The type of keys in the cache.

TValue

The type of values in the cache.