core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java
/**
    * Allows multiple configurations to be defined for a cache manager before it is started, using the supplied
    * {@link ConfigurationBuilderHolder}.  These cannot be shared per node so this method doesn't allow the user to make
    * the mistake and instead will give you one instance per node.
    * <p>
    * This method will wait until all nodes are up before returning
    * @param consumer consumer to configure the caches
    * @param count how many nodes to bring up
    */
Allows multiple configurations to be defined for a cache manager before it is started, using the supplied
ConfigurationBuilderHolder.  These cannot be shared per node so this method doesn't allow the user to make
the mistake and instead will give you one instance per node.

This method will wait until all nodes are up before returning
@param consumer consumer to configure the caches
@param count how many nodes to bring up
Allows multiple configurations to be defined for a cache manager before it is started using the supplied ConfigurationBuilderHolder . These cannot be shared per node so this method doesn ' t allow the user to make the mistake and instead will give you one instance per node . This method will wait until all nodes are up before returning @param consumer consumer to configure the caches @param count how many nodes to bring up
protected void createCluster(Consumer<ConfigurationBuilderHolder> consumer, int count) {
      for (int i = 0; i < count; ++i) {
         ConfigurationBuilderHolder holder = new ConfigurationBuilderHolder();
         holder.getGlobalConfigurationBuilder().clusteredDefault();
         consumer.accept(holder);
         addClusterEnabledCacheManager(holder);
      }
      waitForClusterToForm();
   }
protected void createCluster ( Consumer < ConfigurationBuilderHolder > consumer , int count ) { for ( int i = 0 ; i < count ; ++ i ) { ConfigurationBuilderHolder holder = new ConfigurationBuilderHolder ( ) ; holder . getGlobalConfigurationBuilder ( ) . clusteredDefault ( ) ; consumer . accept ( holder ) ; addClusterEnabledCacheManager ( holder ) ; } waitForClusterToForm ( ) ; }
Allows multiple configurations to be defined for a cache manager before it is started, using the supplied
 {@link ConfigurationBuilderHolder}.
Allows multiple configurations to be defined for a cache manager before it is started using the supplied { @link ConfigurationBuilderHolder } .