private JCacheWriterAdapter<K, V> getCacheWriterAdapter(PersistenceManagerImpl persistenceManager) {
return (JCacheWriterAdapter<K, V>) persistenceManager.getAllWriters().get(0);
}
private void addExpirationTrackingInterceptor(AdvancedCache<K, V> cache, JCacheNotifier notifier) {
ExpirationTrackingInterceptor interceptor = new ExpirationTrackingInterceptor(
cache.getDataContainer(), this, notifier, cache.getComponentRegistry().getTimeService());
cache.addInterceptorBefore(interceptor, EntryWrappingInterceptor.class);
}