17.3.2. カスタムインターセプターをプログラミングにより追加
JBoss Data Grid でカスタムインターセプターをプログラミングにより追加するには、最初に
AdvancedCache への参照を取得します。
例:
CacheManager cm = getCacheManager();
Cache aCache = cm.getCache("aName");
AdvancedCache advCache = aCache.getAdvancedCache();
次に、
addInterceptor() メソッドを使用してインターセプターを追加します。
例:
advCache.addInterceptor(new MyInterceptor(), 0);