Package org.infinispan.config

Examples of org.infinispan.config.Configuration$LoadersConfig


      return resp;
   }

   public JoinHandle howToHandle(CacheRpcCommand cmd) {
      Configuration localConfig = cmd.getConfiguration();
      ComponentRegistry cr = cmd.getComponentRegistry();

      if (localConfig.getCacheMode().isDistributed()) {
         DistributionManager dm = cr.getComponent(DistributionManager.class);
         if (dm.isJoinComplete())
            return JoinHandle.OK;
         else {
            // no point in enqueueing clustered GET commands - just ignore these and hope someone else in the cluster responds.
View Full Code Here


   public DefaultCacheManager(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration,
                              boolean start) {
      this.globalConfiguration = globalConfiguration == null ? new GlobalConfiguration() : globalConfiguration
              .clone();
      this.globalConfiguration.accept(configurationValidator);
      this.defaultConfiguration = defaultConfiguration == null ? new Configuration() : defaultConfiguration.clone();
      this.globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this, reflectionCache, caches.keySet());
      this.cacheCreateLock = new ReentrantLock();
      if (start)
         start();
   }
View Full Code Here

         globalConfiguration = configuration.parseGlobalConfiguration();
         globalConfiguration.accept(configurationValidator);
         defaultConfiguration = configuration.parseDefaultConfiguration();
         for (Map.Entry<String, Configuration> entry : configuration.parseNamedConfigurations().entrySet()) {
            Configuration c = defaultConfiguration.clone();
            c.applyOverrides(entry.getValue());
            configurationOverrides.put(entry.getKey(), c);
         }
         globalComponentRegistry = new GlobalComponentRegistry(globalConfiguration, this, reflectionCache, caches.keySet());
         cacheCreateLock = new ReentrantLock();
      } catch (RuntimeException re) {
View Full Code Here

                 configurationStream, schemaInputStream);
         globalConfiguration = configuration.parseGlobalConfiguration();
         globalConfiguration.accept(configurationValidator);
         defaultConfiguration = configuration.parseDefaultConfiguration();
         for (Map.Entry<String, Configuration> entry : configuration.parseNamedConfigurations().entrySet()) {
            Configuration c = defaultConfiguration.clone();
            c.applyOverrides(entry.getValue());
            configurationOverrides.put(entry.getKey(), c);
         }
         globalComponentRegistry = new GlobalComponentRegistry(globalConfiguration, this, reflectionCache, caches.keySet());
         cacheCreateLock = new ReentrantLock();
      } catch (ConfigurationException ce) {
View Full Code Here

            InfinispanConfiguration NCconfiguration = InfinispanConfiguration.newInfinispanConfiguration(
                    namedCacheFile, InfinispanConfiguration.resolveSchemaPath(),
                    Thread.currentThread().getContextClassLoader());

            for (Map.Entry<String, Configuration> entry : NCconfiguration.parseNamedConfigurations().entrySet()) {
               Configuration c = defaultConfiguration.clone();
               c.applyOverrides(entry.getValue());
               configurationOverrides.put(entry.getKey(), c);
            }
         }

         globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this, reflectionCache, caches.keySet());
View Full Code Here

   /**
    * {@inheritDoc}
    */
   public Configuration defineConfiguration(String cacheName, String templateName, Configuration configurationOverride) {
      if (templateName != null) {
         Configuration c = configurationOverrides.get(templateName);
         if (c != null)
            return defineConfiguration(cacheName, configurationOverride, c, false);
         return defineConfiguration(cacheName, configurationOverride);
      }
      return defineConfiguration(cacheName, configurationOverride);
View Full Code Here

      if (cacheName == null || configOverride == null)
         throw new NullPointerException("Null arguments not allowed");
      if (cacheName.equals(DEFAULT_CACHE_NAME))
         throw new IllegalArgumentException("Cache name cannot be used as it is a reserved, internal name");
      if (checkExisting) {
         Configuration existing = configurationOverrides.get(cacheName);
         if (existing != null) {
            existing.applyOverrides(configOverride);
            return existing.clone();
         }
      }
      Configuration configuration = defaultConfigIfNotPresent.clone();
      configuration.applyOverrides(configOverride.clone());
      configurationOverrides.put(cacheName, configuration);
      setConfigurationName(cacheName, configuration);
      return configuration;
   }
View Full Code Here

      cmd.injectComponents(null, globalComponentRegistry.getNamedComponentRegistry(cacheName));
      cmd.setCacheName(cacheName);
      Transport transport = getTransport();
      try {
         if (transport != null) {
            Configuration c = getConfiguration(cacheName);
            // Use sync replication timeout
            transport.invokeRemotely(null, cmd, ResponseMode.SYNCHRONOUS, c.getSyncReplTimeout(), false, null, false);
         }
         // Once sent to the cluster, remove the local cache
         cmd.perform(null);
      } catch (Throwable t) {
         throw new CacheException("Error removing cache", t);
View Full Code Here

      try {
         CacheWrapper existingCache = caches.get(cacheName);
         if (existingCache != null)
            return existingCache.getCache();

         Configuration c = getConfiguration(cacheName);
         setConfigurationName(cacheName, c);

         c.setGlobalConfiguration(globalConfiguration);
         c.accept(configurationValidator);
         c.assertValid();
         Cache cache = new InternalCacheFactory().createCache(c, globalComponentRegistry, cacheName, reflectionCache);
         CacheWrapper cw = new CacheWrapper(cache);
         try {
            existingCache = caches.putIfAbsent(cacheName, cw);
            if (existingCache != null) {
View Full Code Here

         LogFactory.popNDC(log.isTraceEnabled());
      }
   }

   private Configuration getConfiguration(String cacheName) {
      Configuration c;
      if (cacheName.equals(DEFAULT_CACHE_NAME) || !configurationOverrides.containsKey(cacheName))
         c = defaultConfiguration.clone();
      else
         c = configurationOverrides.get(cacheName);
      return c;
View Full Code Here

TOP

Related Classes of org.infinispan.config.Configuration$LoadersConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.