Examples of eviction()


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

            assert c.locking().lockAcquisitionTimeout() == 20000;
            assert c.locking().concurrencyLevel() == 500;
            assert c.locking().useLockStriping();
            assert c.transaction().recovery().enabled();
            assert c.eviction().strategy().equals(EvictionStrategy.LIRS);
            assert c.eviction().maxEntries() == 1000;
         }

      });

   }
View Full Code Here

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

      cb.eviction().maxEntries(76767);
      withCacheManager(new CacheManagerCallable(createCacheManager(cb)) {
         @Override
         public void call() {
            Configuration cfg = cm.getCache().getCacheConfiguration();
            assert cfg.eviction().maxEntries() == 76767;
            assert cfg.eviction().strategy() != EvictionStrategy.NONE;
         }
      });
   }
View Full Code Here

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

      withCacheManager(new CacheManagerCallable(createCacheManager(cb)) {
         @Override
         public void call() {
            Configuration cfg = cm.getCache().getCacheConfiguration();
            assert cfg.eviction().maxEntries() == 76767;
            assert cfg.eviction().strategy() != EvictionStrategy.NONE;
         }
      });
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
View Full Code Here

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

      c = cm.getCacheConfiguration("cacheWithCustomInterceptors");
      assert !c.customInterceptors().interceptors().isEmpty();
      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;
View Full Code Here

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

      assert !c.customInterceptors().interceptors().isEmpty();
      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;
View Full Code Here

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

      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();
      assert c.deadlockDetection().spinDuration() == 1221;
View Full Code Here

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

      return new BaseLockFactory(cache, indexName);
   }

   private static void validateMetadataCache(Cache<?, ?> cache, String indexName) {
      Configuration configuration = cache.getCacheConfiguration();
      if (configuration.eviction().strategy().isEnabled()) {
         throw log.evictionNotAllowedInMetadataCache(indexName, cache.getName());
      }
      if (configuration.persistence().usingStores() && !configuration.persistence().preload()) {
         throw log.preloadNeededIfPersistenceIsEnabledForMetadataCache(indexName, cache.getName());
      }
View Full Code Here

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

        Configuration groupCacheConfiguration = groupCache.getCacheConfiguration();
        EmbeddedCacheManager container = groupCache.getCacheManager();
        ConfigurationBuilder builder = new ConfigurationBuilder().read(groupCacheConfiguration);
        builder.storeAsBinary().enable().storeKeysAsBinary(true).storeValuesAsBinary(false);
        if (this.maxSize > 0) {
            if (!groupCacheConfiguration.eviction().strategy().isEnabled()) {
                builder.eviction().strategy(EvictionStrategy.LRU);
            }
            builder.eviction().maxEntries(this.maxSize);
        }
        groupCache.getCacheManager().defineConfiguration(beanName, builder.build());
View Full Code Here

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

            assertEquals(i.properties().getProperty("foo"), "bar");
         }
      }

      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());
View Full Code Here

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

         }
      }

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