Package org.infinispan.client.hotrod

Examples of org.infinispan.client.hotrod.RemoteCacheManager


      clientCache = clientCacheManager.getCache();
      org.infinispan.client.hotrod.configuration.ConfigurationBuilder rcmBuilder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();
      rcmBuilder.addServer()
         .host(hrServer.getHost())
         .port(hrServer.getPort());
      remoteCacheManager = new RemoteCacheManager(rcmBuilder.build());
      remoteCacheManager.start();
      remoteCache = remoteCacheManager.getCache();
   }
View Full Code Here


      targetContainer = TestCacheManagerFactory
            .createCacheManager(hotRodCacheConfiguration(targetConfigurationBuilder));
      targetServerCache = targetContainer.getCache();
      targetServer = TestHelper.startHotRodServer(targetContainer);

      sourceRemoteCacheManager = new RemoteCacheManager("localhost", sourceServer.getPort());
      sourceRemoteCacheManager.start();
      sourceRemoteCache = sourceRemoteCacheManager.getCache();

      targetRemoteCacheManager = new RemoteCacheManager("localhost", targetServer.getPort());
      targetRemoteCacheManager.start();
      targetRemoteCache = targetRemoteCacheManager.getCache();
   }
View Full Code Here

   @Override
   public void start() throws CacheLoaderException {
      super.start();
      if (config.getHotRodClientProperties().containsKey(ConfigurationProperties.MARSHALLER)) {
         remoteCacheManager = new RemoteCacheManager(config.getHotRodClientProperties(), true, config.getClassLoader(), config.getAsyncExecutorFactory());
      } else {
         Marshaller marshaller = config.isRawValues() ? new GenericJBossMarshaller() : getMarshaller();
         if (marshaller == null) {throw new IllegalStateException("Null marshaller not allowed!");}
         remoteCacheManager = new RemoteCacheManager(marshaller, config.getHotRodClientProperties(), true, config.getClassLoader(), config.getAsyncExecutorFactory());
      }
      if (config.getRemoteCacheName().equals(BasicCacheContainer.DEFAULT_CACHE_NAME))
         remoteCache = remoteCacheManager.getCache();
      else
         remoteCache = remoteCacheManager.getCache(config.getRemoteCacheName());
View Full Code Here

   public void start() throws CacheLoaderException {
      super.start();
      Marshaller marshaller = getMarshaller();

      if (marshaller == null) {throw new IllegalStateException("Null marshaller not allowed!");}
      remoteCacheManager = new RemoteCacheManager(new InternalCacheEntryMarshaller(marshaller), config.getHotRodClientProperties());
      remoteCache = remoteCacheManager.getCache(config.getRemoteCacheName());
   }
View Full Code Here

   public void start() throws CacheLoaderException {
      super.start();
      StreamingMarshaller marshaller = getMarshaller();

      if (marshaller == null) {throw new IllegalStateException("Null marshaller not allowed!");}
      remoteCacheManager = new RemoteCacheManager(marshaller, config.getHotRodClientProperties(), true, config.getClassLoader(), config.getAsyncExecutorFactory());
      if (config.getRemoteCacheName().equals(BasicCacheContainer.DEFAULT_CACHE_NAME))
         remoteCache = remoteCacheManager.getCache();
      else
         remoteCache = remoteCacheManager.getCache(config.getRemoteCacheName());
   }
View Full Code Here

                .marshaller(new CustomJBossMarshaller())
                .socketTimeout(configuration.getClusterTimeout())
                .connectionTimeout(configuration.getClusterTimeout())
                .build();

        cacheManager = new RemoteCacheManager(remoteCfg);

        log.info("initialised Infinispan remote cache manager (servers: {})",  configuration.getClusterAddress());
    }
View Full Code Here

         this.logger.debug("Using explicitly set configuration settings [" + answer
                  + "] for configuring RemoteCacheManager");
      } else {
         this.logger
                  .debug("No configuration properties. RemoteCacheManager will use default configuration.");
         answer = new RemoteCacheManager().getProperties();
      }
      return answer;
   }
View Full Code Here

   @Override
   public void afterPropertiesSet() throws Exception {
      assertCorrectlyConfigured();
      this.logger.info("Creating new instance of RemoteCacheManager ...");
      final Properties configurationPropertiesToUse = configurationProperties();
      this.nativeRemoteCacheManager = new RemoteCacheManager(configurationPropertiesToUse,
               this.startAutomatically);
      this.logger.info("Finished creating new instance of RemoteCacheManager");
   }
View Full Code Here

   @Override
   public void afterPropertiesSet() throws Exception {
      assertCorrectlyConfigured();
      this.logger.info("Creating new instance of RemoteCacheManager ...");
      final Properties configurationPropertiesToUse = configurationProperties();
      final RemoteCacheManager nativeRemoteCacheManager = new RemoteCacheManager(
               configurationPropertiesToUse, this.startAutomatically);
      this.springRemoteCacheManager = new SpringRemoteCacheManager(nativeRemoteCacheManager);
      this.logger.info("Finished creating new instance of RemoteCacheManager");
   }
View Full Code Here

   @Override
   public void afterPropertiesSet() throws Exception {
      assertCorrectlyConfigured();
      this.logger.info("Creating new instance of RemoteCacheManager ...");
      final Properties configurationPropertiesToUse = configurationProperties();
      this.nativeRemoteCacheManager = new RemoteCacheManager(configurationPropertiesToUse,
               this.startAutomatically);
      this.logger.info("Finished creating new instance of RemoteCacheManager");
   }
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.RemoteCacheManager

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.