use of org.commonjava.indy.subsys.infinispan.BasicCacheHandle in project indy by Commonjava.
the class MetadataCacheProducer method registerTransformer.
private void registerTransformer(BasicCacheHandle handler) {
// for embedded mode
if (handler instanceof CacheHandle) {
((CacheHandle<MetadataKey, MetadataKey>) handler).executeCache(cache -> {
SearchManagerImplementor searchManager = (SearchManagerImplementor) Search.getSearchManager(cache);
searchManager.registerKeyTransformer(MetadataKey.class, MetadataKeyTransformer.class);
return null;
});
}
if (handler.getCache() instanceof RemoteCache) {
((RemoteCache) handler.getCache()).addClientListener(cacheListener);
} else {
((Cache) handler.getCache()).addListener(cacheListener);
}
}
Aggregations