Examples of RemoteCacheManager


Examples of org.infinispan.client.hotrod.RemoteCacheManager

               infinispanRemoteCacheManagerWithDefaultConfiguration);
   }

   @Test
   public final void shouldCreateARemoteCacheManagerConfiguredFromConfigurationPropertiesFileIfConfigurationPropertiesFileLocationGiven() {
      final RemoteCacheManager infinispanRemoteCacheManagerConfiguredFromConfigurationFile = this.applicationContext
               .getBean(INFINISPAN_REMOTE_CACHE_MANAGER_CONFIGURED_FROM_CONFIGURATION_PROPERTIES_FILE_BEAN_NAME,
                        RemoteCacheManager.class);

      assertNotNull(
               "Spring application context should contain a RemoteCacheManager configured from configuration properties file having bean name = \""
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

               infinispanRemoteCacheManagerConfiguredFromConfigurationFile);
   }

   @Test
   public final void shouldCreateARemoteCacheManagerConfiguredFromConfigurationPropertiesIfConfigurationPropertiesGiven() {
      final RemoteCacheManager infinispanRemoteCacheManagerConfiguredFromConfigurationProperties = this.applicationContext
               .getBean(INFINISPAN_REMOTE_CACHE_MANAGER_CONFIGURED_FROM_CONFIGURATION_PROPERTIES_BEAN_NAME,
                        RemoteCacheManager.class);

      assertNotNull(
               "Spring application context should contain a RemoteCacheManager configured from configuration properties having bean name = \""
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

               infinispanRemoteCacheManagerConfiguredFromConfigurationProperties);
   }

   @Test
   public final void shouldCreateARemoteCacheManagerConfiguredUsingSettersIfPropertiesAreDefined() {
      final RemoteCacheManager infinispanRemoteCacheManagerConfiguredUsingSetters = this.applicationContext
               .getBean(INFINISPAN_REMOTE_CACHE_MANAGER_CONFIGURED_USING_SETTERS_BEAN_NAME,
                        RemoteCacheManager.class);

      assertNotNull(
               "Spring application context should contain a SpringRemoteCacheManager configured using properties having bean name = \""
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

   @BeforeClass
   public void setupRemoteCacheFactory() {
      hotrodServer = HotRodTestingUtil.startHotRodServer(cacheManager, 19733);
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.addServer().host("localhost").port(hotrodServer.getPort());
      remoteCacheManager = new RemoteCacheManager(builder.build());
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

            throws Exception {
      final InfinispanRemoteCacheManagerFactoryBean objectUnderTest = new InfinispanRemoteCacheManagerFactoryBean();

      objectUnderTest.afterPropertiesSet();

      final RemoteCacheManager remoteCacheManager = objectUnderTest.getObject();
      assertPropertiesSubset(
               "The configuration properties used by the RemoteCacheManager returned by getObject() should be equal "
                        + "to RemoteCacheManager's default settings since neither property 'configurationProperties' "
                        + "nor property 'configurationPropertiesFileLocation' has been set. However, those two are not equal.",
               new RemoteCacheManager().getProperties(), remoteCacheManager.getProperties());
      objectUnderTest.destroy();
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

    */
   @Test
   public final void destroyShouldStopTheProducedCache() throws Exception {
      final InfinispanRemoteCacheManagerFactoryBean objectUnderTest = new InfinispanRemoteCacheManagerFactoryBean();
      objectUnderTest.afterPropertiesSet();
      final RemoteCacheManager remoteCacheManager = objectUnderTest.getObject();

      objectUnderTest.destroy();

      assertFalse(
               "destroy() should have stopped the RemoteCacheManager instance previously produced by "
                        + "AbstractRemoteCacheManagerFactory. However, the produced RemoteCacheManager is still running. ",
               remoteCacheManager.isStarted());
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

      final InfinispanRemoteCacheManagerFactoryBean objectUnderTest = new InfinispanRemoteCacheManagerFactoryBean();
      final Properties configurationProperties = loadConfigurationProperties(HOTROD_CLIENT_PROPERTIES_LOCATION);
      objectUnderTest.setConfigurationProperties(configurationProperties);
      objectUnderTest.afterPropertiesSet();

      final RemoteCacheManager remoteCacheManager = objectUnderTest.getObject();
      assertPropertiesSubset(
               "The configuration properties used by the RemoteCacheManager returned von getObject() should be equal "
                        + "to those passed into InfinispanRemoteCacheMangerFactoryBean via setConfigurationProperties(props). "
                        + "However, those two are not equal.", configurationProperties,
               remoteCacheManager.getProperties());
      objectUnderTest.destroy();
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

            throws Exception {
      final InfinispanRemoteCacheManagerFactoryBean objectUnderTest = new InfinispanRemoteCacheManagerFactoryBean();
      objectUnderTest.setConfigurationPropertiesFileLocation(HOTROD_CLIENT_PROPERTIES_LOCATION);
      objectUnderTest.afterPropertiesSet();

      final RemoteCacheManager remoteCacheManager = objectUnderTest.getObject();
      assertPropertiesSubset(
               "The configuration properties used by the RemoteCacheManager returned by getObject() should be equal "
                        + "to those passed into InfinispanRemoteCacheMangerFactoryBean via setConfigurationPropertiesFileLocation(propsFileLocation). "
                        + "However, those two are not equal.",
               loadConfigurationProperties(HOTROD_CLIENT_PROPERTIES_LOCATION),
               remoteCacheManager.getProperties());
      objectUnderTest.destroy();
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

   public final void shouldProduceAStoppedCacheIfStartAutomaticallyIsSetToFalse() throws Exception {
      final InfinispanRemoteCacheManagerFactoryBean objectUnderTest = new InfinispanRemoteCacheManagerFactoryBean();
      objectUnderTest.setStartAutomatically(false);
      objectUnderTest.afterPropertiesSet();

      final RemoteCacheManager remoteCacheManagerExpectedToBeInStateStopped = objectUnderTest
               .getObject();

      assertFalse(
               "AbstractRemoteCacheManagerFactory should have produced a RemoteCacheManager that is initially in state stopped "
                        + "since property 'startAutomatically' has been set to false. However, the produced RemoteCacheManager is already started.",
               remoteCacheManagerExpectedToBeInStateStopped.isStarted());
      objectUnderTest.destroy();
   }
View Full Code Here

Examples of org.infinispan.client.hotrod.RemoteCacheManager

      objectUnderTest.setTransportFactory(expectedTransportFactory);
      objectUnderTest.setStartAutomatically(false); // Otherwise, RemoteCacheManager will try to
                                                    // actually use our DummyTransportFactory
      objectUnderTest.afterPropertiesSet();

      final RemoteCacheManager remoteCacheManager = objectUnderTest.getObject();

      assertEquals("setTransportFactory(" + expectedTransportFactory
               + ") should have overridden property 'transportFactory'. However, it didn't.",
               expectedTransportFactory, remoteCacheManager.getProperties().get(TRANSPORT_FACTORY));
      objectUnderTest.destroy();
   }
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.