Examples of clustering()


Examples of org.infinispan.config.FluentConfiguration.clustering()

      if (config == null)
         return null;

      FluentConfiguration legacy = new Configuration().fluent();

      legacy.clustering()
         .mode(CacheMode.valueOf(config.clustering().cacheMode().name()));

      if (!config.clustering().cacheMode().isSynchronous()) {
         legacy.clustering()
            .async()
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

  }

  public static void verifyConfiguredAsClustered(final Cache<?, ?> cache) {
    verifyConfiguredAsClustered( cache.getCacheManager() );
    final Configuration cacheConfiguration = cache.getCacheConfiguration();
    Assert.assertTrue( "This Cache is managed by a clustered CacheManager, but the Cache is having clustering disabled!", cacheConfiguration.clustering().cacheMode().isClustered() );
  }

  /**
   * For manual tests and debugging
   */
 
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

         Transport transport = getTransport();
         try {
            if (transport != null) {
               Configuration c = getConfiguration(cacheName);
               // Use sync replication timeout
               transport.invokeRemotely(null, cmd, ResponseMode.SYNCHRONOUS, c.clustering().sync().replTimeout(), false, null, false, false);
            }
            // Once sent to the cluster, remove the local cache
            cmd.perform(null);

            // Remove cache configuration and remove it from the computed cache name list
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromXml("configs/as7/standalone.xml")) {

         @Override
         public void call() {
            Configuration c = cm.getCacheConfiguration("default");
            assert c.clustering().cacheMode().equals(CacheMode.LOCAL);
            assert c.locking().isolationLevel().equals(IsolationLevel.NONE);
            assert c.locking().lockAcquisitionTimeout() == 30000;
            assert c.locking().concurrencyLevel() == 1000;
            assert !c.locking().useLockStriping();
            assert c.transaction().transactionMode().equals(TransactionMode.NON_TRANSACTIONAL);
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

            assert fcsc.async().modificationQueueSize() == 1024;
            assert fcsc.async().shutdownTimeout() == 25000;
            assert fcsc.async().threadPoolSize() == 1;

            c = cm.getCacheConfiguration("distsync");
            assert c.clustering().cacheMode().equals(CacheMode.DIST_SYNC);
            assert c.locking().isolationLevel().equals(IsolationLevel.READ_COMMITTED);
            assert c.locking().lockAcquisitionTimeout() == 20000;
            assert c.locking().concurrencyLevel() == 500;
            assert c.locking().useLockStriping();
            assert c.transaction().recovery().enabled();
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

   }

   @Test
   public void testConsistentHash() {
      Configuration config = LegacyConfigurationAdaptor.adapt(new org.infinispan.config.Configuration());
      Assert.assertNull(config.clustering().hash().consistentHash());
   }

   @Test
   public void testDisableL1() {
      withCacheManager(new CacheManagerCallable(
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.clustering()

   }

   public void testExpectedConfig() {
      Configuration cc = cache(0).getCacheConfiguration();
      assert !cc.locking().supportsConcurrentUpdates();
      assert cc.clustering().cacheMode().isDistributed();
      assert !cc.transaction().transactionMode().isTransactional();
   }
}
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.clustering()

      ConfigurationBuilder builder = new ConfigurationBuilder();
      // A local, lightweight cache for pending puts, which is
      // non-transactional and has aggressive expiration settings.
      // Locking is still required since the putFromLoad validator
      // code uses conditional operations (i.e. putIfAbsent).
      builder.clustering().cacheMode(CacheMode.LOCAL)
         .transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL)
         .expiration().maxIdle(TimeUnit.SECONDS.toMillis(60))
         .storeAsBinary().enabled(false)
         .locking().isolationLevel(IsolationLevel.READ_COMMITTED)
         .jmxStatistics().disable();
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.clustering()

 
  private Configuration initConfiguration() {
   
    ConfigurationBuilder builder = new ConfigurationBuilder();
   
    ClusteringConfigurationBuilder clusteringConfigurationBuilder = builder.clustering();
   
    clusteringConfigurationBuilder = clusteringConfigurationBuilder.cacheMode(CacheMode.DIST_SYNC);
   
    HashConfigurationBuilder hashConfigurationBuilder = clusteringConfigurationBuilder.hash();
   
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.clustering()

 
  private static Configuration initConfiguration() {
   
    ConfigurationBuilder builder = new ConfigurationBuilder();
   
    ClusteringConfigurationBuilder clusteringConfigurationBuilder = builder.clustering();
   
    clusteringConfigurationBuilder = clusteringConfigurationBuilder.cacheMode(CacheMode.DIST_SYNC);
   
    HashConfigurationBuilder hashConfigurationBuilder = clusteringConfigurationBuilder.hash();
   
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.