Examples of EvictionConfig


Examples of org.jboss.cache.config.EvictionConfig

      assertEquals("Passivated value available from buddy", "value", cache2.get(foo, "key"));
   }

   private void configureEviction(Configuration cfg)
   {
      EvictionConfig ec = new EvictionConfig();
      ec.setWakeupInterval(5000);
      EvictionRegionConfig erc = new EvictionRegionConfig();
      erc.setRegionFqn(Fqn.ROOT);
      LRUAlgorithmConfig lruAlgorithmConfig = new LRUAlgorithmConfig();
      lruAlgorithmConfig.setMaxAge(0);
      lruAlgorithmConfig.setTimeToLive(0);
      lruAlgorithmConfig.setMaxNodes(1);
      erc.setEvictionAlgorithmConfig(lruAlgorithmConfig);
      ec.setDefaultEvictionRegionConfig(erc);
      cfg.setEvictionConfig(ec);
   }
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.