Package org.infinispan.config

Examples of org.infinispan.config.GlobalConfiguration.fluent()


      if (doSetId)
         globalCfg.fluent().serialization().addAdvancedExternalizer(id, new IdViaConfigObj.Externalizer());
      else
         globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaConfigObj.Externalizer());

      globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaAnnotationObj.Externalizer());
      globalCfg.fluent().serialization().addAdvancedExternalizer(3456, new IdViaBothObj.Externalizer());
      return globalCfg;
   }

   private void withExpectedInternalFailure(final AdvancedExternalizer ext, String message) {
View Full Code Here


         globalCfg.fluent().serialization().addAdvancedExternalizer(id, new IdViaConfigObj.Externalizer());
      else
         globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaConfigObj.Externalizer());

      globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaAnnotationObj.Externalizer());
      globalCfg.fluent().serialization().addAdvancedExternalizer(3456, new IdViaBothObj.Externalizer());
      return globalCfg;
   }

   private void withExpectedInternalFailure(final AdvancedExternalizer ext, String message) {
      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
View Full Code Here

   private static synchronized EmbeddedCacheManager getUniqueInstance(String regionId, EmbeddedCacheManager manager)
   {
      GlobalConfiguration gc = manager.getGlobalConfiguration();
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      // Ensure that the cluster name won't be used between 2 ExoContainers
      gc.fluent().transport().clusterName(gc.getClusterName() + "_" + container.getContext().getName())
         .globalJmxStatistics().cacheManagerName(gc.getCacheManagerName() + "_" + container.getContext().getName()).
         // Configure the MBeanServerLookup
         mBeanServerLookup(MBEAN_SERVER_LOOKUP);
      Configuration conf = manager.getDefaultConfiguration();
      if (CACHE_MANAGERS.containsKey(gc))
View Full Code Here

            configuration.fluent().mode(mode);
            defaults.add(mode, configuration);
        }
*/
        GlobalConfiguration global = new GlobalConfiguration(this.getClass().getClassLoader());
        global.fluent()
            .transport().distributedSyncTimeout(60000L)
            .shutdown().hookBehavior(ShutdownHookBehavior.DONT_REGISTER)
            ;
        Defaults defaults = new Defaults(global);
        Configuration defaultConfig = new Configuration();
View Full Code Here

    @Override
    public void start(StartContext context) throws StartException {
        EmbeddedCacheManagerDefaults defaults = this.configuration.getDefaults();
        GlobalConfiguration global = defaults.getGlobalConfiguration().clone();
        TransportConfiguration transport = this.configuration.getTransportConfiguration();
        FluentGlobalConfiguration.TransportConfig fluentTransport = global.fluent().transport();
        if (transport != null) {
            fluentTransport.transportClass(JGroupsTransport.class);
            Long timeout = transport.getLockTimeout();
            if (timeout != null) {
                fluentTransport.distributedSyncTimeout(timeout.longValue());
View Full Code Here

      }
   }

   public void testForeignExternalizerMultiClassTypesViaSameExternalizer() {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
      globalCfg.fluent().serialization().addAdvancedExternalizer(new MultiIdViaClassExternalizer());
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalCfg);
      try {
         cm.getCache();
         ExternalizerTable extTable = TestingUtil.extractExtTable(cm);
         assert 767 == extTable.getExternalizerId(new IdViaConfigObj());
View Full Code Here

      }
   }

   public void testForeignExternalizerMultiClassNameTypesViaSameExternalizer() {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
      globalCfg.fluent().serialization().addAdvancedExternalizer(868, new MultiIdViaClassNameExternalizer());
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalCfg);
      try {
         cm.getCache();
         ExternalizerTable extTable = TestingUtil.extractExtTable(cm);
         assert 868 == extTable.getExternalizerId(new IdViaConfigObj());
View Full Code Here

      }
   }

   private GlobalConfiguration createForeignExternalizerGlobalConfig(int id) {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
      globalCfg.fluent().serialization().addAdvancedExternalizer(id, IdViaBothObj.Externalizer.class);
      return globalCfg;
   }

   private GlobalConfiguration createMultiForeignExternalizerGlobalConfig(int id, boolean doSetId) {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
View Full Code Here

   }

   private GlobalConfiguration createMultiForeignExternalizerGlobalConfig(int id, boolean doSetId) {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
      if (doSetId)
         globalCfg.fluent().serialization().addAdvancedExternalizer(id, new IdViaConfigObj.Externalizer());
      else
         globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaConfigObj.Externalizer());

      globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaAnnotationObj.Externalizer());
      globalCfg.fluent().serialization().addAdvancedExternalizer(3456, new IdViaBothObj.Externalizer());
View Full Code Here

   private GlobalConfiguration createMultiForeignExternalizerGlobalConfig(int id, boolean doSetId) {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
      if (doSetId)
         globalCfg.fluent().serialization().addAdvancedExternalizer(id, new IdViaConfigObj.Externalizer());
      else
         globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaConfigObj.Externalizer());

      globalCfg.fluent().serialization().addAdvancedExternalizer(new IdViaAnnotationObj.Externalizer());
      globalCfg.fluent().serialization().addAdvancedExternalizer(3456, new IdViaBothObj.Externalizer());
      return globalCfg;
   }
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.