Examples of EvictionController


Examples of org.jboss.cache.util.internals.EvictionController

            fail("Failed to insert data" + e);
            e.printStackTrace();
         }
      }

      EvictionController evictionController = new EvictionController(cache);
      evictionController.startEviction();

      String str1 = rootStr + "7";
      Fqn fqn1 = Fqn.fromString(str1);
      String str2 = rootStr + "7/7";
      Fqn fqn2 = Fqn.fromString(str2);
      try
      {
         assertNotNull(cache.get(fqn2, str2));
         assertNotNull(cache.get(fqn1, str1));
         cache.removeNode(fqn2);
         evictionController.startEviction();
         assertNull(cache.get(fqn2, str2));
         assertNotNull(cache.get(fqn1, str1));
         cache.removeNode(fqn1);
         evictionController.startEviction();
         assertNull(cache.get(fqn1, str1));
         assertNull(cache.get(fqn2, str2));

         String str3 = rootStr + "5/5";
         String str4 = rootStr + "5";
         Fqn fqn3 = Fqn.fromString(str3);
         Fqn fqn4 = Fqn.fromString(str4);
         assertNotNull(cache.get(fqn3, str3));
         assertNotNull(cache.get(fqn4, str4));

         evictionController.startEviction();

         // remove the node above fqn4 /org/jboss/test/5 will cascade the delete into /org/jboss/test/5/5
         cache.removeNode(fqn4);

         evictionController.startEviction();
         assertNull(cache.get(fqn3, str3));
         assertNull(cache.get(fqn4, str4));
      }
      catch (Exception e)
      {
View Full Code Here

Examples of org.jboss.cache.util.internals.EvictionController

      String str = rootStr + "0";
      Fqn fqn = Fqn.fromString(str);
      cache1.put(str, str, str);

      new EvictionController(cache1).startEviction();
      Object node = cache1.peek(fqn, false);
      assertNull("Node should be evicted already ", node);
      assertEquals("Eviction counter ", 1, listener.getCounter());
      String val = (String) cache2.get(str, str);
      assertNotNull("DataNode should not be evicted here ", val);
View Full Code Here

Examples of org.jboss.cache.util.internals.EvictionController

         String str = rootStr + i;
         Fqn fqn = Fqn.fromString(str);
         cache1.put(fqn, str, str);
      }

      new EvictionController(cache1).startEviction();

      String val = (String) cache1.get(rootStr + "3", rootStr + "3");
      assertNull("DataNode should be evicted already ", val);
      val = (String) cache2.get(rootStr + "3", rootStr + "3");
      assertNotNull("DataNode should not be evicted here ", val);
View Full Code Here

Examples of org.jboss.cache.util.internals.EvictionController

      String str = rootStr + "7";
      Fqn fqn = Fqn.fromString(str);
      cache1.get(fqn, str);

      new EvictionController(cache1).startEviction();

      String val = (String) cache1.get(rootStr + "3", rootStr + "3");
      assertNull("DataNode should be empty ", val);
      val = (String) cache2.get(rootStr + "7", rootStr + "7");
      assertNotNull("DataNode should not be null", val);
View Full Code Here

Examples of org.jboss.cache.util.internals.EvictionController

         cache.put("/a/b/1", "a", "b");
         cache.put("/a/b/2", "a", "b");
         cache.put("/a/b/3", "a", "b");

         new EvictionController(cache).startEviction();

         assert cache.getNode("/a/b/1") == null;
         assert cache.getNode("/a/b/2") != null;
         assert cache.getNode("/a/b/3") != null;
      }
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.