Package org.infinispan.config

Examples of org.infinispan.config.GlobalConfiguration$ExternalizersConfig


         }
         default : {
            throw new RuntimeException("Bad!");
         }
      }
      GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
      gc.setRackId(rack);
      gc.setMachineId(machine);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(gc, deConfiguration);
      cacheManagers.add(cm);
      return cm;
   }
View Full Code Here


         }
         default : {
            throw new RuntimeException("Bad!");
         }
      }
      GlobalConfiguration globalConfiguration = cm.getGlobalConfiguration();
      globalConfiguration.setRackId(rack);
      globalConfiguration.setMachineId(machine);
      cacheManagers.add(cm);
      return cm;
   }
View Full Code Here

         }
         default : {
            throw new RuntimeException("Bad!");
         }
      }
      GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
      gc.setRackId(rack);
      gc.setMachineId(machine);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(gc, new Configuration());
      cacheManagers.add(cm);
      return cm;
   }
View Full Code Here

         }
         default : {
            throw new RuntimeException("Bad!");
         }
      }
      GlobalConfiguration globalConfiguration = cm.getGlobalConfiguration();
      globalConfiguration.setRackId(rack);
      globalConfiguration.setMachineId(machine);
      cacheManagers.add(cm);
      return cm;
   }
View Full Code Here

    * @see org.jboss.ha.ispn.CacheContainerFactory#createCacheContainer(org.jboss.ha.ispn.CacheContainerConfiguration)
    */
   @Override
   public EmbeddedCacheManager createCacheContainer(CacheContainerConfiguration configuration)
   {
      GlobalConfiguration globalConfiguration = configuration.getGlobalConfiguration();
      Properties properties = globalConfiguration.getTransportProperties();
      properties.put(CHANNEL_FACTORY, this.channelFactory);
      properties.setProperty(CHANNEL_ID, globalConfiguration.getClusterName());
      properties.setProperty(JGroupsTransport.CHANNEL_LOOKUP, ChannelFactoryChannelLookup.class.getName());

      EmbeddedCacheManager manager = new DefaultCacheManager(globalConfiguration, configuration.getDefaultConfiguration(), false);

      // Add named configurations
View Full Code Here

    * @see org.jboss.ha.ispn.CacheContainerFactory#createCacheContainer(org.jboss.ha.ispn.CacheContainerConfiguration, java.util.Map)
    */
   @Override
   public CacheContainer createCacheContainer(CacheContainerConfiguration configuration, Map<String, String> aliases)
   {
      GlobalConfiguration globalConfiguration = configuration.getGlobalConfiguration();
      Properties properties = globalConfiguration.getTransportProperties();
      properties.put(CHANNEL_FACTORY, this.channelFactory);
      properties.setProperty(CHANNEL_ID, globalConfiguration.getClusterName());
      properties.setProperty(JGroupsTransport.CHANNEL_LOOKUP, ChannelFactoryChannelLookup.class.getName());

      EmbeddedCacheManager manager = new DefaultCacheManager(globalConfiguration, configuration.getDefaultConfiguration(), false);

      // Add named configurations
View Full Code Here

                        aliases = new ServiceName[list.size()];
                        for (int i = 0; i < list.size(); i++) {
                            aliases[i] = EmbeddedCacheManagerService.getServiceName(list.get(i).asString());
                        }
                    }
                    GlobalConfiguration global = CacheContainerAdd.this.global.clone();
                    String transportExecutor = null;
                    String stack = null;
                    if (operation.hasDefined(ModelKeys.TRANSPORT)) {
                        ModelNode transport = operation.get(ModelKeys.TRANSPORT);
                        if (transport.hasDefined(ModelKeys.STACK)) {
                            stack = transport.get(ModelKeys.STACK).asString();
                        }
                        if (transport.hasDefined(ModelKeys.EXECUTOR)) {
                            transportExecutor = transport.get(ModelKeys.EXECUTOR).asString();
                        }
                        if (transport.hasDefined(ModelKeys.LOCK_TIMEOUT)) {
                            global.setDistributedSyncTimeout(transport.get(ModelKeys.LOCK_TIMEOUT).asLong());
                        }
                        if (transport.hasDefined(ModelKeys.SITE)) {
                            global.setSiteId(transport.get(ModelKeys.SITE).asString());
                        }
                        if (transport.hasDefined(ModelKeys.RACK)) {
                            global.setRackId(transport.get(ModelKeys.RACK).asString());
                        }
                        if (transport.hasDefined(ModelKeys.MACHINE)) {
                            global.setMachineId(transport.get(ModelKeys.MACHINE).asString());
                        }
                    }
                    List<Map.Entry<String, Injector<String>>> locationInjectors = new LinkedList<Map.Entry<String, Injector<String>>>();
                    Map<String, Configuration> configs = new LinkedHashMap<String, Configuration>();
                    for (ModelNode cache: operation.require(ModelKeys.CACHE).asList()) {
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(GlobalConfiguration globalConfiguration, Configuration defaultConfiguration,
                              boolean start) {
      this.globalConfiguration = globalConfiguration == null ? new GlobalConfiguration() : globalConfiguration
              .clone();
      this.globalConfiguration.accept(new ConfigurationValidatingVisitor());
      this.defaultConfiguration = defaultConfiguration == null ? new Configuration() : defaultConfiguration.clone();
      this.defaultConfiguration.accept(new ConfigurationValidatingVisitor());
      this.globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this, reflectionCache);
View Full Code Here

    * @deprecated Use {@link #DefaultCacheManager(org.infinispan.configuration.global.GlobalConfiguration, org.infinispan.configuration.cache.Configuration, boolean)} instead
    */
   @Deprecated
   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, caches.keySet());
      this.cacheCreateLock = new ReentrantLock();
View Full Code Here

    * @see org.jboss.ha.ispn.CacheContainerFactory#createCacheContainer(org.jboss.ha.ispn.CacheContainerConfiguration)
    */
   @Override
   public EmbeddedCacheManager createCacheContainer(CacheContainerConfiguration configuration)
   {
      GlobalConfiguration globalConfiguration = configuration.getGlobalConfiguration();
      Properties properties = globalConfiguration.getTransportProperties();
      properties.put(CHANNEL_FACTORY, this.channelFactory);
      properties.setProperty(CHANNEL_ID, globalConfiguration.getClusterName());
      properties.setProperty(JGroupsTransport.CHANNEL_LOOKUP, ChannelFactoryChannelLookup.class.getName());

      EmbeddedCacheManager manager = new DefaultCacheManager(globalConfiguration, configuration.getDefaultConfiguration(), false);

      // Add named configurations
View Full Code Here

TOP

Related Classes of org.infinispan.config.GlobalConfiguration$ExternalizersConfig

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.