Package org.infinispan.config

Examples of org.infinispan.config.GlobalConfiguration$ExecutorFactoryConfig


    * @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(configurationValidator);
      this.defaultConfiguration = defaultConfiguration == null ? new Configuration() : defaultConfiguration.clone();
      this.globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this, reflectionCache, caches.keySet());
      this.cacheCreateLock = new ReentrantLock();
View Full Code Here


      cache = null;
   }

   private ComponentsJmxRegistration buildRegistrator() {
      Set<AbstractComponentRegistry.Component> components = cache.getComponentRegistry().getRegisteredComponents();
      GlobalConfiguration configuration = cache.getConfiguration().getGlobalConfiguration();
      MBeanServer beanServer = getMBeanServer(configuration);
      ComponentsJmxRegistration registrator = new ComponentsJmxRegistration(beanServer, components, getGroupName());
      updateDomain(registrator, cache.getAdvancedCache().getComponentRegistry().getGlobalComponentRegistry(), beanServer);
      return registrator;
   }
View Full Code Here

      updateDomain(registrator, cache.getAdvancedCache().getComponentRegistry().getGlobalComponentRegistry(), beanServer);
      return registrator;
   }

   static void updateDomain(ComponentsJmxRegistration registrator, GlobalComponentRegistry componentRegistry, MBeanServer mBeanServer) {
      GlobalConfiguration gc = componentRegistry.getComponent(GlobalConfiguration.class);
      String componentName = CacheJmxRegistration.class.getName() + "_jmxDomain";
      String jmxDomain = componentRegistry.getComponent(String.class, componentName);
      if (jmxDomain == null) {
         jmxDomain = getJmxDomain(gc.getJmxDomain(), mBeanServer);
         if (!jmxDomain.equals(gc.getJmxDomain()) && !gc.isAllowDuplicateDomains()) {
            String message = "There's already an cache manager instance registered under '" + gc.getJmxDomain() +
                  "' JMX domain. If you want to allow multiple instances configured with same JMX domain enable " +
                  "'allowDuplicateDomains' attribute in 'globalJmxStatistics' config element";
            if (log.isErrorEnabled()) log.error(message);
            throw new JmxDomainConflictException(message);
         }
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.
    * @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.setDefaultConfiguration(defaultConfiguration == null ? new Configuration() : defaultConfiguration.clone());
      globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this);
      if (start) start();
   }
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());
      globalComponentRegistry = new GlobalComponentRegistry(this.globalConfiguration, this);
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);
View Full Code Here

        assertSame(expected, result);
    }

    @Test
    public void getGlobalConfiguration() {
        GlobalConfiguration expected = new GlobalConfiguration();
        when(this.manager.getGlobalConfiguration()).thenReturn(expected);

        GlobalConfiguration result = this.subject.getGlobalConfiguration();

        assertSame(expected, result);
    }
View Full Code Here

*/
public class LifecycleCallbacks extends AbstractModuleLifecycle {

   @Override
   public void cacheManagerStarting(GlobalComponentRegistry gcr) {
      GlobalConfiguration globalCfg = gcr.getGlobalConfiguration();
      globalCfg.addExternalizer(1000, new NodeKey.Externalizer());
      globalCfg.addExternalizer(1001, new Fqn.Externalizer());
   }
View Full Code Here

   @Start(priority = 20)
   public void start() throws Exception {
      if (trace) log.trace("Starting distribution manager on " + getMyAddress());
      listener = new ViewChangeListener();
      notifier.addListener(listener);
      GlobalConfiguration gc = configuration.getGlobalConfiguration();
      if (gc.hasTopologyInfo()) {
         Address address = rpcManager.getTransport().getAddress();
         NodeTopologyInfo nti = new NodeTopologyInfo(gc.getMachineId(), gc.getRackId(), gc.getSiteId(), address);
         topologyInfo.addNodeTopologyInfo(address, nti);
      }
      join();
   }
View Full Code Here

      namingMain.stop();
   }

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getNonClusteredDefault();
      Configuration configuration = new Configuration();
      cacheManager = TestCacheManagerFactory.createCacheManager(globalConfiguration, configuration);
      return cacheManager;
   }
View Full Code Here

TOP

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

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.