final CacheNotifier notifier = cache.getComponentRegistry().getComponent(CacheNotifier.class);
((AdvancedCacheWriter)w).purge(new WithinThreadExecutor(), new AdvancedCacheWriter.PurgeListener() {
@Override
public void entryPurged(Object key) {
InternalCacheEntry ice = new ImmortalCacheEntry(key, null);
notifier.notifyCacheEntriesEvicted(Collections.singleton(ice), null, null);
}
});
}
}
} finally {