Examples of defineConfiguration()


Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      final EmbeddedCacheManager nativeEmbeddedCacheManager = new DefaultCacheManager(
               templateConfiguration.globalConfiguration,
               templateConfiguration.defaultConfiguration);
      for (final Map.Entry<String, Configuration> namedCacheConfig : templateConfiguration.namedCaches
               .entrySet()) {
         nativeEmbeddedCacheManager.defineConfiguration(namedCacheConfig.getKey(),
                  namedCacheConfig.getValue());
      }

      return nativeEmbeddedCacheManager;
   }
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      for(Object cache : caches) {
         Cache cacheObj = (Cache) cache;
         EmbeddedCacheManager cm1 = cacheObj.getCacheManager();
         ConfigurationBuilder cacheCfg1 = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, false);
         cm1.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESDATA_CACHENAME, cacheCfg1.build());
         cm1.defineConfiguration(InfinispanIntegration.DEFAULT_LOCKING_CACHENAME, cacheCfg1.build());

         cacheManagers.add(cm1);
      }
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      for(Object cache : caches) {
         Cache cacheObj = (Cache) cache;
         EmbeddedCacheManager cm1 = cacheObj.getCacheManager();
         ConfigurationBuilder cacheCfg1 = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, false);
         cm1.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESDATA_CACHENAME, cacheCfg1.build());
         cm1.defineConfiguration(InfinispanIntegration.DEFAULT_LOCKING_CACHENAME, cacheCfg1.build());

         cacheManagers.add(cm1);
      }

      waitForClusterToForm(neededCacheNames);
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      ConfigurationBuilder builder = getDefaultStandaloneCacheConfig(true);
      builder.indexing().enable().indexLocalOnly(false)
            .addProperty("default.directory_provider", "ram")
            .addProperty("lucene_version", "LUCENE_CURRENT");

      cm.defineConfiguration(CACHE_NAME, builder.build());
      return cm;
   }

   @Override
   protected void setup() throws Exception {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

        CacheMode mode = this.config.clustering().cacheMode();
        if (mode.isClustered() && (container.getTransport() == null)) {
            throw InfinispanMessages.MESSAGES.transportRequired(mode, this.name, container.getCacheManagerConfiguration().globalJmxStatistics().cacheManagerName());
        }

        container.defineConfiguration(this.name, this.config);

        log.debugf("%s cache configuration started", this.name);
    }

    /**
 
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

            EmbeddedCacheManager cacheManager = EmbeddedCacheManager.class.cast(cacheFactory);
            @SuppressWarnings("rawtypes")
            Cache cache = null;
            if (cacheManager != null) {
                // TODO override global settings with security domain specific
                cacheManager.defineConfiguration(securityDomain, "auth-cache", new Configuration());
                cache = cacheManager.getCache(securityDomain);
            }
            if (cache != null && am instanceof CacheableManager) {
                @SuppressWarnings({ "unchecked", "rawtypes" })
                CacheableManager<Map, Principal> cm = (CacheableManager<Map, Principal>) am;
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

            EmbeddedCacheManager cacheManager = EmbeddedCacheManager.class.cast(cacheFactory);
            @SuppressWarnings("rawtypes")
            Cache cache = null;
            if (cacheManager != null) {
                // TODO override global settings with security domain specific
                cacheManager.defineConfiguration(securityDomain, "auth-cache", new Configuration());
                cache = cacheManager.getCache(securityDomain);
            }
            if (cache != null && am instanceof CacheableManager) {
                @SuppressWarnings({ "unchecked", "rawtypes" })
                CacheableManager<Map, Principal> cm = (CacheableManager<Map, Principal>) am;
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      configurationBuilder.locking().useLockStriping(false); // reduces the odd chance of a key collision and deadlock
   }

   protected EmbeddedCacheManager createCacheManager() {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(new TransportFlags().withMerge(true));
      cm.defineConfiguration(cacheName, configurationBuilder.build());
      return cm;
   }

   public static class DelayTransfer implements Serializable {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      JoiningNode node = new JoiningNode(createCacheManager());
      cache2 = node.getCache(cacheName);
      node.waitForJoin(60000, cache1, cache2);
      node.verifyStateTransfer(new CacheVerifier(cache2));

      cacheManager1.defineConfiguration("otherCache", configurationBuilder.build());
      cacheManager1.getCache("otherCache");
      logTestEnd(m);
   }

   public void testConcurrentStateTransfer(Method m) throws Exception {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      }
   }

   protected EmbeddedCacheManager createCacheManager() {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager();
      cm.defineConfiguration(TX_CACHE, buildConfiguration(true));
      cm.defineConfiguration(NONTX_CACHE, buildConfiguration(true));
      return cm;
   }

   protected void writeInitialData(final Cache<Object, Object> c) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.