Search in sources :

Example 1 with VersionedCallInterceptor

use of org.hibernate.cache.infinispan.access.VersionedCallInterceptor in project hibernate-orm by hibernate.

the class BaseTransactionalDataRegion method prepareForVersionedEntries.

protected void prepareForVersionedEntries() {
    if (strategy != null) {
        assert strategy == Strategy.VERSIONED_ENTRIES;
        return;
    }
    replaceCommonInterceptors();
    replaceExpirationManager();
    cache.removeInterceptor(CallInterceptor.class);
    VersionedCallInterceptor tombstoneCallInterceptor = new VersionedCallInterceptor(this, metadata.getVersionComparator());
    cache.getComponentRegistry().registerComponent(tombstoneCallInterceptor, VersionedCallInterceptor.class);
    List<CommandInterceptor> interceptorChain = cache.getInterceptorChain();
    cache.addInterceptor(tombstoneCallInterceptor, interceptorChain.size());
    strategy = Strategy.VERSIONED_ENTRIES;
}
Also used : VersionedCallInterceptor(org.hibernate.cache.infinispan.access.VersionedCallInterceptor) CommandInterceptor(org.infinispan.interceptors.base.CommandInterceptor)

Aggregations

VersionedCallInterceptor (org.hibernate.cache.infinispan.access.VersionedCallInterceptor)1 CommandInterceptor (org.infinispan.interceptors.base.CommandInterceptor)1