Package org.jboss.cache

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


      config.setMaxElementsPerNode(100);

      for (int i = 0; i < 20; i++)
      {
         Fqn fqn = Fqn.fromString("/a/b/" + Integer.toString(i));
         region.registerEvictionEvent(fqn, EvictionEvent.Type.ADD_NODE_EVENT);
         for (int k = 0; k < i; k++)
         {
            region.registerEvictionEvent(fqn, EvictionEvent.Type.ADD_ELEMENT_EVENT);

         }
View Full Code Here


      {
         Fqn fqn = Fqn.fromString("/a/b/" + Integer.toString(i));
         region.registerEvictionEvent(fqn, EvictionEvent.Type.ADD_NODE_EVENT);
         for (int k = 0; k < i; k++)
         {
            region.registerEvictionEvent(fqn, EvictionEvent.Type.ADD_ELEMENT_EVENT);

         }
      }

      algo.process(region.getEvictionEventQueue());
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);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(1);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      algorithm.process(region.getEvictionEventQueue());

      assertEquals(1, algorithm.getEvictionQueue().getNumberOfNodes());
View Full Code Here

      Fqn fqn3 = Fqn.fromString("/a/b/e");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(1);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      algorithm.process(region.getEvictionEventQueue());

      assertEquals(1, algorithm.getEvictionQueue().getNumberOfNodes());
View Full Code Here

      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(1);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      algorithm.process(region.getEvictionEventQueue());

      assertEquals(1, algorithm.getEvictionQueue().getNumberOfNodes());

      config.setMaxNodes(100);
View Full Code Here

      config.setMaxNodes(100);
      for (int i = 0; i < 150; i++)
      {
         Fqn fqn = Fqn.fromString("/a/b/c/" + Integer.toString(i));
         region.registerEvictionEvent(fqn, EvictionEvent.Type.ADD_NODE_EVENT);
      }

      algorithm.process(region.getEvictionEventQueue());

      assertEquals(100, algorithm.getEvictionQueue().getNumberOfNodes());
View Full Code Here

      Fqn fqn9 = Fqn.fromString("/a/b/k");
      Fqn fqn10 = Fqn.fromString("/a/b/l");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(8);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn5, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn6, EvictionEvent.Type.ADD_NODE_EVENT);
View Full Code Here

      Fqn fqn10 = Fqn.fromString("/a/b/l");
      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(8);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn5, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn6, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn7, EvictionEvent.Type.ADD_NODE_EVENT);
View Full Code Here

      RegionImpl region = (RegionImpl) regionManager.getRegion("/a/b", true);
      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(8);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn5, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn6, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn7, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn8, EvictionEvent.Type.ADD_NODE_EVENT);
View Full Code Here

      MRUAlgorithmConfig config = (MRUAlgorithmConfig) region.getEvictionRegionConfig().getEvictionAlgorithmConfig();
      config.setMaxNodes(8);
      region.registerEvictionEvent(fqn1, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn2, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn3, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn4, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn5, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn6, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn7, EvictionEvent.Type.ADD_NODE_EVENT);
      region.registerEvictionEvent(fqn8, EvictionEvent.Type.ADD_NODE_EVENT);
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.