Package org.jboss.cache

Examples of org.jboss.cache.RegionImpl.registerEvictionEvent()


      Fqn fqn2 = Fqn.fromString("/a/b/d");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      config.setMaxNodes(-1);
      config.setMinNodes(20);
      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      try
      {
         algo.process(region.getEvictionEventQueue());
      }
      catch (EvictionException e)
View Full Code Here


      Fqn fqn2 = Fqn.fromString("/a/b/d");
      Fqn fqn3 = Fqn.fromString("/a/b/e");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      config.setMaxNodes(1);
      config.setMinNodes(20);
      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);

      try
      {
         algo.process(region.getEvictionEventQueue());
View Full Code Here

      Fqn fqn3 = Fqn.fromString("/a/b/e");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      config.setMaxNodes(1);
      config.setMinNodes(20);
      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);

      try
      {
         algo.process(region.getEvictionEventQueue());
      }
View Full Code Here

         fail("testMaxNode: process failed " + e);
         e.printStackTrace();
      }
      assertEquals("Queue size should be ", 1, algo.getEvictionQueue().getNumberOfNodes());

      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);


      try
      {
View Full Code Here

         e.printStackTrace();
      }
      assertEquals("Queue size should be ", 1, algo.getEvictionQueue().getNumberOfNodes());

      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);


      try
      {
         algo.process(region.getEvictionEventQueue());
View Full Code Here

      LFUAlgorithmConfig config = (LFUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();

      config.setMaxNodes(-1);
      config.setMinNodes(2);

      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, ADD_NODE_EVENT);

      algo.process(region.getEvictionEventQueue());
View Full Code Here

      config.setMaxNodes(-1);
      config.setMinNodes(2);

      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, ADD_NODE_EVENT);

      algo.process(region.getEvictionEventQueue());
View Full Code Here

      config.setMaxNodes(-1);
      config.setMinNodes(2);

      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, ADD_NODE_EVENT);

      algo.process(region.getEvictionEventQueue());

      assertEquals("Queue size should be ", 2, algo.getEvictionQueue().getNumberOfNodes());
View Full Code Here

      config.setMinNodes(2);

      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, ADD_NODE_EVENT);

      algo.process(region.getEvictionEventQueue());

      assertEquals("Queue size should be ", 2, algo.getEvictionQueue().getNumberOfNodes());
   }
View Full Code Here

      LFUAlgorithmConfig config = (LFUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();

      config.setMaxNodes(-1);
      config.setMinNodes(-1);

      region.registerEvictionEvent(fqn1, ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, ADD_NODE_EVENT);

      algo.process(region.getEvictionEventQueue());

      assertEquals("Queue size should be ", 0, algo.getEvictionQueue().getNumberOfNodes());
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.