Examples of expiration()


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()

         assertEquals(configuration.expiration().maxIdle(), 121);
         assertEquals(configuration.expiration().lifespan(), 122);
         LoadersConfiguration loaders = configuration.loaders();
         assert loaders.cacheLoaders().get(0) instanceof FileCacheStoreConfiguration;

         assertEquals(configuration.expiration().wakeUpInterval(), 119000);
         assertEquals(configuration.eviction().strategy(), EvictionStrategy.LRU);

         String definedCacheNames = dcm.getDefinedCacheNames();
         assert definedCacheNames.contains("sampleCache1");
         assert definedCacheNames.contains("sampleCache2");
View Full Code Here

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

         assert definedCacheNames.contains("sampleDistributedCache3");

         sampleDistributedCache2 = dcm.getCache("sampleDistributedCache2");
         Configuration configuration2 = sampleDistributedCache2.getCacheConfiguration();
         assert configuration2.loaders().cacheLoaders().size() == 1;
         assert configuration2.expiration().lifespan() == 101;
         assert configuration2.expiration().maxIdle() == 102;
         assertEquals(configuration2.clustering().cacheMode(), CacheMode.INVALIDATION_SYNC);

      } finally {
         currentThread().setContextClassLoader(existingCl);
View Full Code Here

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

         sampleDistributedCache2 = dcm.getCache("sampleDistributedCache2");
         Configuration configuration2 = sampleDistributedCache2.getCacheConfiguration();
         assert configuration2.loaders().cacheLoaders().size() == 1;
         assert configuration2.expiration().lifespan() == 101;
         assert configuration2.expiration().maxIdle() == 102;
         assertEquals(configuration2.clustering().cacheMode(), CacheMode.INVALIDATION_SYNC);

      } finally {
         currentThread().setContextClassLoader(existingCl);
         TestingUtil.killCaches(sampleDistributedCache2);
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

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.