Examples of takeLastEventNode()


Examples of org.jboss.cache.Region.takeLastEventNode()

      region.putNodeEvent(new EvictedEventNode(fqn1, NodeEventType.ADD_NODE_EVENT));
      region.putNodeEvent(new EvictedEventNode(fqn2, NodeEventType.ADD_NODE_EVENT));
      region.putNodeEvent(new EvictedEventNode(fqn3, NodeEventType.ADD_NODE_EVENT));

      assertEquals("AddedNode queue size ", 3, region.nodeEventQueueSize());
      EvictedEventNode node = region.takeLastEventNode();
      Fqn fqn = node.getFqn();
      assertEquals("DataNode retrieved should be FILO ", fqn, fqn1);
      assertEquals("AddedNode queue size ", 2, region.nodeEventQueueSize());
      fqn = region.takeLastEventNode().getFqn();
      fqn = region.takeLastEventNode().getFqn();
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal,
            new Object[]{Fqn.fromString(fqn1)});
      interceptor.invoke(mc);
      Region regionABC = regionManager.getRegion(fqn1);
      assertNull(regionABC.takeLastEventNode());

      cache.put(fqn1, "key", "value");
      assertEquals("value", cache.get(fqn1, "key"));
      Node node = cache.get(fqn1);
      assertNotNull(node);
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal,
            new Object[]{Fqn.fromString(fqn1)});
      interceptor.invoke(mc);

      regionABC = regionManager.getRegion(fqn1);
      EvictedEventNode event = regionABC.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn1, event.getFqn().toString());
      assertNull(regionABC.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal,
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      regionABC = regionManager.getRegion(fqn1);
      EvictedEventNode event = regionABC.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn1, event.getFqn().toString());
      assertNull(regionABC.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal,
            new Object[]{Fqn.fromString(fqn2)});
      interceptor.invoke(mc);
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal,
            new Object[]{Fqn.fromString(fqn2)});
      interceptor.invoke(mc);

      Region regionAB = regionManager.getRegion(fqn2);
      event = regionAB.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn2, event.getFqn().toString());
      assertNull(regionAB.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getDataMapMethodLocal, new Object[]{Fqn.fromString(fqn3)});
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      Region regionAB = regionManager.getRegion(fqn2);
      event = regionAB.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn2, event.getFqn().toString());
      assertNull(regionAB.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getDataMapMethodLocal, new Object[]{Fqn.fromString(fqn3)});
      interceptor.invoke(mc);
      Region regionABD = regionManager.getRegion(fqn3);
      event = regionABD.takeLastEventNode();
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      assertNull(regionAB.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getDataMapMethodLocal, new Object[]{Fqn.fromString(fqn3)});
      interceptor.invoke(mc);
      Region regionABD = regionManager.getRegion(fqn3);
      event = regionABD.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn3, event.getFqn().toString());
      assertNull(regionABD.takeLastEventNode());

      for (int i = 0; i < 10; i++)
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      interceptor.invoke(mc);
      Region regionABD = regionManager.getRegion(fqn3);
      event = regionABD.takeLastEventNode();
      assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
      assertEquals(fqn3, event.getFqn().toString());
      assertNull(regionABD.takeLastEventNode());

      for (int i = 0; i < 10; i++)
      {
         Fqn fqn = Fqn.fromString(fqn3);
         mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal, new Object[]{fqn});
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      }

      for (int i = 0; i < 10; i++)
      {
         Region region = regionManager.getRegion(fqn3);
         event = region.takeLastEventNode();
         assertEquals(EvictedEventNode.VISIT_NODE_EVENT, event.getEvent());
         assertEquals(fqn3, event.getFqn().toString());
      }

      assertNull(regionManager.getRegion(fqn3).takeLastEventNode());
View Full Code Here

Examples of org.jboss.cache.eviction.Region.takeLastEventNode()

      Fqn fqn = Fqn.fromString(fqn4);
      Object key = "key";
      MethodCall mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, new Object[]{fqn, key, Boolean.FALSE});
      interceptor.invoke(mc);
      Region region = regionManager.getRegion(fqn.toString());
      assertNull(region.takeLastEventNode());

      // add the node but try to get on a null element should result in no cache events being added to Region.
      cache.put(fqn, "wrongkey", "");
      mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, new Object[]{fqn, key, Boolean.FALSE});
      interceptor.invoke(mc);
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.