Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.LegacyConfigurationAdaptor


    *
    * @param globalConfiguration  global configuration to use. If null, a default instance is created.
    * @param defaultConfiguration default configuration to use. If null, a default instance is created.
    */
   public DefaultCacheManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration, org.infinispan.configuration.cache.Configuration defaultConfiguration) {
      this(new LegacyGlobalConfigurationAdaptor().adapt(globalConfiguration), new LegacyConfigurationAdaptor().adapt(defaultConfiguration), true);
   }
View Full Code Here


    * @param defaultConfiguration default configuration to use. If null, a default instance is created.
    * @param start                if true, the cache manager is started
    */
   public DefaultCacheManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration, org.infinispan.configuration.cache.Configuration defaultConfiguration,
                              boolean start) {
      this(new LegacyGlobalConfigurationAdaptor().adapt(globalConfiguration), new LegacyConfigurationAdaptor().adapt(defaultConfiguration), start);
   }
View Full Code Here


   @Override
   public org.infinispan.configuration.cache.Configuration defineConfiguration(String cacheName,
         org.infinispan.configuration.cache.Configuration configuration) {
      defineConfiguration(cacheName, new LegacyConfigurationAdaptor().adapt(configuration));
      return configuration;
   }
View Full Code Here

    *
    * @param globalConfiguration  global configuration to use. If null, a default instance is created.
    * @param defaultConfiguration default configuration to use. If null, a default instance is created.
    */
   public DefaultCacheManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration, org.infinispan.configuration.cache.Configuration defaultConfiguration) {
      this(new LegacyGlobalConfigurationAdaptor().adapt(globalConfiguration), new LegacyConfigurationAdaptor().adapt(defaultConfiguration), true);
   }
View Full Code Here

    * @param defaultConfiguration default configuration to use. If null, a default instance is created.
    * @param start                if true, the cache manager is started
    */
   public DefaultCacheManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration, org.infinispan.configuration.cache.Configuration defaultConfiguration,
                              boolean start) {
      this(new LegacyGlobalConfigurationAdaptor().adapt(globalConfiguration), new LegacyConfigurationAdaptor().adapt(defaultConfiguration), start);
   }
View Full Code Here

      try {
         ConfigurationBuilderHolder holder = new Parser(Thread.currentThread().getContextClassLoader()).parse(configurationStream);
        
         globalConfiguration = new LegacyGlobalConfigurationAdaptor().adapt(holder.getGlobalConfigurationBuilder().build());
         globalConfiguration.accept(configurationValidator);
         defaultConfiguration = new LegacyConfigurationAdaptor().adapt(holder.getDefaultConfigurationBuilder().build());
        
         for (ConfigurationBuilder b : holder.getConfigurationBuilders()) {
            org.infinispan.configuration.cache.Configuration c = b.build();
            Configuration legacy = new LegacyConfigurationAdaptor().adapt(c);
            configurationOverrides.put(c.name(), legacy);
         }
        
         globalComponentRegistry = new GlobalComponentRegistry(globalConfiguration, this, caches.keySet());
         cacheCreateLock = new ReentrantLock();
View Full Code Here

     
      ConfigurationBuilderHolder globalConfigurationBuilderHolder = parser.parse(globalConfigurationFile);
      ConfigurationBuilderHolder defaultConfigurationBuilderHolder = parser.parse(defaultConfigurationFile);
     
      globalConfiguration = new LegacyGlobalConfigurationAdaptor().adapt(globalConfigurationBuilderHolder.getGlobalConfigurationBuilder().build());
      defaultConfiguration = new LegacyConfigurationAdaptor().adapt(defaultConfigurationBuilderHolder.getDefaultConfigurationBuilder().build());
     
      if (namedCacheFile != null) {
         ConfigurationBuilderHolder namedConfigurationBuilderHolder = parser.parse(namedCacheFile);
         org.infinispan.configuration.cache.Configuration c = namedConfigurationBuilderHolder.getConfigurationBuilders().iterator().next().build();
         defineConfiguration(c.name(), new LegacyConfigurationAdaptor().adapt(c));
      }

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


   @Override
   public org.infinispan.configuration.cache.Configuration defineConfiguration(String cacheName,
         org.infinispan.configuration.cache.Configuration configuration) {
      defineConfiguration(cacheName, new LegacyConfigurationAdaptor().adapt(configuration));
      return configuration;
   }
View Full Code Here

   public Configuration getDefaultConfiguration() {
      return defaultConfiguration;
   }
  
   public org.infinispan.configuration.cache.Configuration getDefaultCacheConfiguration() {
      return new LegacyConfigurationAdaptor().adapt(defaultConfiguration);
   }
View Full Code Here

   public org.infinispan.configuration.cache.Configuration getCacheConfiguration(String name) {
      Configuration c = configurationOverrides.get(name);
      if (c == null)
         return null;
      else
         return new LegacyConfigurationAdaptor().adapt(c);
   }
View Full Code Here

TOP

Related Classes of org.infinispan.configuration.cache.LegacyConfigurationAdaptor

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.