コンストラクタ
# 新しいCacheStatusEventListener(折り返し電話)
パラメーター:
| 名前 | タイプ | 詳細説明 |
|---|---|---|
callback |
function | 通知を受け取ったときに呼び出されるメソッド |
例:
const ncache = require('ncache-client');
function myCacheStatusEventListener() {
//...
}
//Initialize the Cache Cluster
let cache = await ncache.CacheManager.getCache("demoCache");
let notificationService = await ncache.cache.getNotificationService();
//Create Cache Status Event Listener
let listener = new ncache.CacheStatusEventListener(myCacheStatusEventListener);
await notificationService.addCacheStatusEventListener(listener, ncache.CacheStatusNotificationType.CacheStopped);