Package org.infinispan.configuration.global

Examples of org.infinispan.configuration.global.GlobalConfigurationBuilder


            // 1. Create a configuration builder holder
            ConfigurationBuilderHolder holder = new ConfigurationBuilderHolder();

            // 2. Build global configuration with custom settings
            GlobalConfigurationBuilder globalBuilder = holder.getGlobalConfigurationBuilder();
            globalBuilder.read(manager.getCacheManagerConfiguration());
            globalBuilder.globalJmxStatistics().enabled(Boolean.parseBoolean(globalStats));

            // 3. Build default configuration
            holder.getDefaultConfigurationBuilder().read(manager.getDefaultCacheConfiguration());

            // 4. Build all defined caches
View Full Code Here


public class InfinispanStuBase {

private GlobalConfiguration initGlobalConfiguration() {
   
    GlobalConfigurationBuilder builder = GlobalConfigurationBuilder.defaultClusteredBuilder();
   
    TransportConfigurationBuilder transportConfigurationBuilder = builder.transport();
   
    transportConfigurationBuilder = transportConfigurationBuilder.addProperty("configurationFile", "jgroups.xml");
   
    GlobalConfiguration globalConfiguration = transportConfigurationBuilder.build();
 
View Full Code Here

   public DefaultCacheManager getCacheManager() {
      if (manager == null) {
         log.info("DefaultCacheManager does not exist - constructing a new one");

         GlobalConfiguration glob = new GlobalConfigurationBuilder()
               .clusteredDefault() // Builds a default clustered configuration
               .transport().addProperty("configurationFile", "jgroups-udp.xml") //provide a specific JGroups configuration
               .globalJmxStatistics().allowDuplicateDomains(true).enable()  //This method enables the jmx statistics of
                     // the global configuration and allows for duplicate JMX domains
               .build()// Builds the GlobalConfiguration object
View Full Code Here

        AdvancedExternalizer<?> rowKeyExternalizer = RowKeyExternalizer.INSTANCE;
        AdvancedExternalizer<?> entityKeyMetadataExternalizer = EntityKeyMetadataExternalizer.INSTANCE;
        AdvancedExternalizer<?> idGeneratorKeyExternalizer = IdSourceKeyExternalizer.INSTANCE;

        // override global configuration from the config file to inject externalizers
        GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()
          .read( tmpCacheManager.getCacheManagerConfiguration() )
          .serialization()
            .addAdvancedExternalizer( entityKeyExternalizer.getId(), entityKeyExternalizer )
            .addAdvancedExternalizer( associationKeyExternalizer.getId(), associationKeyExternalizer )
            .addAdvancedExternalizer( rowKeyExternalizer.getId(), rowKeyExternalizer )
View Full Code Here

 
   public DefaultCacheManager getCacheManager() {
        if (manager == null) {
           log.info("DefaultCacheManager does not exist - constructing a new one");

           GlobalConfiguration glob = new GlobalConfigurationBuilder()
                 .clusteredDefault() // Builds a default clustered configuration
                 .transport().addProperty("configurationFile", "jgroups-udp.xml") //provide a specific JGroups configuration
                 .globalJmxStatistics().allowDuplicateDomains(true).enable()  //This method enables the jmx statistics of
                       // the global configuration and allows for duplicate JMX domains
                 .build()// Builds the GlobalConfiguration object
View Full Code Here

    private EmbeddedCacheManager manager;

    public EmbeddedCacheManager getCacheContainer() {
        if (manager == null) {
            GlobalConfiguration glob = new GlobalConfigurationBuilder()
                .nonClusteredDefault() //Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode
                .globalJmxStatistics().enable() //This method allows enables the jmx statistics of the global configuration.
                .jmxDomain("org.infinispan.demo.carmart.tx"//prevent collision with non-transactional carmart
                .build(); //Builds  the GlobalConfiguration object
            Configuration loc = new ConfigurationBuilder()
View Full Code Here

public class DefaultCacheManagerTest {
 
  private static GlobalConfiguration initGlobalConfiguration() {
   
    GlobalConfigurationBuilder builder = GlobalConfigurationBuilder.defaultClusteredBuilder();
   
    TransportConfigurationBuilder transportConfigurationBuilder = builder.transport();
   
    transportConfigurationBuilder = transportConfigurationBuilder.addProperty("configurationFile", "jgroups.xml");
   
    GlobalConfiguration globalConfiguration = transportConfigurationBuilder.build();
 
View Full Code Here

    private BasicCacheContainer manager;

    public BasicCacheContainer getCacheContainer() {
        if (manager == null) {
            GlobalConfiguration glob = new GlobalConfigurationBuilder()
                .nonClusteredDefault() //Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode
                .globalJmxStatistics().enable() //This method allows enables the jmx statistics of the global configuration.
                .jmxDomain("org.infinispan.carmart.tx"//prevent collision with non-transactional carmart
                .build(); //Builds  the GlobalConfiguration object
            Configuration loc = new ConfigurationBuilder()
View Full Code Here

    private BasicCacheContainer manager;

    public BasicCacheContainer getCacheContainer() {
        if (manager == null) {
            GlobalConfiguration glob = new GlobalConfigurationBuilder()
                .nonClusteredDefault() //Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode
                .globalJmxStatistics().enable() //This method allows enables the jmx statistics of the global configuration.
                .jmxDomain("org.infinispan.carmart.tx") //prevent collision with non-transactional carmart
                .build(); //Builds  the GlobalConfiguration object
            Configuration loc = new ConfigurationBuilder()
View Full Code Here

    public DefaultCacheManager getCacheManager() {
        if (manager == null) {
            log.info("\n\n DefaultCacheManager does not exist - constructing a new one\n\n");

            GlobalConfiguration glob = new GlobalConfigurationBuilder().clusteredDefault() // Builds a default clustered
                                                                                           // configuration
                    .transport().addProperty("configurationFile", "jgroups-udp.xml") // provide a specific JGroups configuration
                    .globalJmxStatistics().allowDuplicateDomains(true).enable() // This method enables the jmx statistics of
                    // the global configuration and allows for duplicate JMX domains
                    .build(); // Builds the GlobalConfiguration object
View Full Code Here

TOP

Related Classes of org.infinispan.configuration.global.GlobalConfigurationBuilder

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.