Examples of expiration()


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

      assert c.customInterceptors().interceptors().size() == 5;

      c = cm.getCacheConfiguration("evictionCache");
      assert c.eviction().maxEntries() == 5000;
      assert c.eviction().strategy().equals(EvictionStrategy.LRU);
      assert c.expiration().lifespan() == 60000;
      assert c.expiration().maxIdle() == 1000;
      assert c.eviction().threadPolicy() == EvictionThreadPolicy.PIGGYBACK;
      assert c.expiration().wakeUpInterval() == 500;

      c = cm.getCacheConfiguration("withDeadlockDetection");
View Full Code Here

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

      c = cm.getCacheConfiguration("evictionCache");
      assert c.eviction().maxEntries() == 5000;
      assert c.eviction().strategy().equals(EvictionStrategy.LRU);
      assert c.expiration().lifespan() == 60000;
      assert c.expiration().maxIdle() == 1000;
      assert c.eviction().threadPolicy() == EvictionThreadPolicy.PIGGYBACK;
      assert c.expiration().wakeUpInterval() == 500;

      c = cm.getCacheConfiguration("withDeadlockDetection");
      assert c.deadlockDetection().enabled();
View Full Code Here

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

      assert c.eviction().maxEntries() == 5000;
      assert c.eviction().strategy().equals(EvictionStrategy.LRU);
      assert c.expiration().lifespan() == 60000;
      assert c.expiration().maxIdle() == 1000;
      assert c.eviction().threadPolicy() == EvictionThreadPolicy.PIGGYBACK;
      assert c.expiration().wakeUpInterval() == 500;

      c = cm.getCacheConfiguration("withDeadlockDetection");
      assert c.deadlockDetection().enabled();
      assert c.deadlockDetection().spinDuration() == 1221;
      assert c.clustering().cacheMode() == CacheMode.DIST_SYNC;
View Full Code Here

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

            log.debug("Infinispan transaction manager lookup: " + tmLookup);

            // If we don't want structure cache entries to expire, we need to configure infinite lifespan and keep original
            // lifespan value, which will be send to tree api
            if (skipExpirationOfStructureCacheEntries) {
                cacheLifespanOfLeafNodes = configFromXml.expiration().lifespan();
                configBuilder.expiration().lifespan(-1);
                log.debug("Expiration of structure cache entries is disabled. Leaf nodes will use expiration "
                        + cacheLifespanOfLeafNodes);
            }
View Full Code Here

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

   private static Cache<?, ?> checkValidConfiguration(final Cache<?, ?> cache, String indexName) {
      if (cache == null) {
         return null;
      }
      Configuration configuration = cache.getCacheConfiguration();
      if (configuration.expiration().maxIdle() != -1) {
         throw log.luceneStorageHavingIdleTimeSet(indexName, cache.getName());
      }
      if (configuration.expiration().lifespan() != -1) {
         throw log.luceneStorageHavingLifespanSet(indexName, cache.getName());
      }
View Full Code Here

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

      }
      Configuration configuration = cache.getCacheConfiguration();
      if (configuration.expiration().maxIdle() != -1) {
         throw log.luceneStorageHavingIdleTimeSet(indexName, cache.getName());
      }
      if (configuration.expiration().lifespan() != -1) {
         throw log.luceneStorageHavingLifespanSet(indexName, cache.getName());
      }
      if (configuration.storeAsBinary().enabled()) {
         throw log.luceneStorageAsBinaryEnabled(indexName, cache.getName());
      }
View Full Code Here

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

      }

      c = cm.getCacheConfiguration("evictionCache");
      assertEquals(5000, c.eviction().maxEntries());
      assertEquals(EvictionStrategy.LRU, c.eviction().strategy());
      assertEquals(60000, c.expiration().lifespan());
      assertEquals(1000, c.expiration().maxIdle());
      assertEquals(EvictionThreadPolicy.PIGGYBACK, c.eviction().threadPolicy());
      assertEquals(500, c.expiration().wakeUpInterval());

      c = cm.getCacheConfiguration("withDeadlockDetection");
View Full Code Here

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

      c = cm.getCacheConfiguration("evictionCache");
      assertEquals(5000, c.eviction().maxEntries());
      assertEquals(EvictionStrategy.LRU, c.eviction().strategy());
      assertEquals(60000, c.expiration().lifespan());
      assertEquals(1000, c.expiration().maxIdle());
      assertEquals(EvictionThreadPolicy.PIGGYBACK, c.eviction().threadPolicy());
      assertEquals(500, c.expiration().wakeUpInterval());

      c = cm.getCacheConfiguration("withDeadlockDetection");
      assertTrue(c.deadlockDetection().enabled());
View Full Code Here

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

      assertEquals(5000, c.eviction().maxEntries());
      assertEquals(EvictionStrategy.LRU, c.eviction().strategy());
      assertEquals(60000, c.expiration().lifespan());
      assertEquals(1000, c.expiration().maxIdle());
      assertEquals(EvictionThreadPolicy.PIGGYBACK, c.eviction().threadPolicy());
      assertEquals(500, c.expiration().wakeUpInterval());

      c = cm.getCacheConfiguration("withDeadlockDetection");
      assertTrue(c.deadlockDetection().enabled());
      assertEquals(1221, c.deadlockDetection().spinDuration());
      assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
View Full Code Here

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

               assert defaultConfig.clustering().stateTransfer().timeout() == 2120000;

               assert defaultConfig.clustering().sync().replTimeout() == 22220000;
               assert defaultConfig.eviction().strategy() == EvictionStrategy.LRU;
               assert defaultConfig.eviction().maxEntries() == 5001;
               assert defaultConfig.expiration().maxIdle() == 1001 : "Received " + defaultConfig.expiration().lifespan();
               assert defaultConfig.expiration().wakeUpInterval() == 50015;

               Configuration regionOne = cm.getCacheConfiguration("/org/jboss/data1");
               assert regionOne != null;
               assert regionOne.eviction().strategy() == EvictionStrategy.LRU;
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.