org.infinispan.registry.impl.InternalCacheRegistryImpl Maven / Gradle / Ivy
package org.infinispan.registry.impl;
import java.lang.invoke.MethodHandles;
import java.util.EnumSet;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import org.infinispan.Cache;
import org.infinispan.commons.util.CollectionFactory;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.global.GlobalConfiguration;
import org.infinispan.factories.annotations.Inject;
import org.infinispan.factories.annotations.Stop;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.registry.InternalCacheRegistry;
import org.infinispan.util.concurrent.ConcurrentHashSet;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
/**
* InternalCacheRegistryImpl.
*
* @author Tristan Tarrant
* @since 7.2
*/
public class InternalCacheRegistryImpl implements InternalCacheRegistry {
private static final Log log = LogFactory.getLog(MethodHandles.lookup().lookupClass());
private EmbeddedCacheManager cacheManager;
private final ConcurrentMap> internalCaches = CollectionFactory.makeBoundedConcurrentMap(10);
private final Set privateCaches = new ConcurrentHashSet<>();
@Inject
public void init(EmbeddedCacheManager cacheManager) {
this.cacheManager = cacheManager;
}
@Stop(priority = 1)
public void stop() {
internalCaches.keySet().forEach(cacheName -> {
Cache
© 2015 - 2025 Weber Informatics LLC | Privacy Policy