Package org.jboss.cache.eviction

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


      interceptor.invoke(mc);
      assertNull(region.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, new Object[]{null, null, Boolean.TRUE});
      interceptor.invoke(mc);
      assertNull(region.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, new Object[]{fqn, null, Boolean.TRUE});
      interceptor.invoke(mc);
      assertNull(region.takeLastEventNode());
   }
View Full Code Here


      interceptor.invoke(mc);
      assertNull(region.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal, new Object[]{fqn, null, Boolean.TRUE});
      interceptor.invoke(mc);
      assertNull(region.takeLastEventNode());
   }

   public void testCreateNode() throws Throwable
   {
      Map data = new HashMap();
View Full Code Here

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal, new Object[]{null, fqn, data, Boolean.FALSE});
      interceptor.invoke(mc);

      Region region = regionManager.getRegion(fqn.toString());
      EvictedEventNode event = region.takeLastEventNode();

      assertEquals(EvictedEventNode.ADD_NODE_EVENT, event.getEvent());
      assertEquals(fqn, event.getFqn());
      assertEquals(100, event.getElementDifference());
View Full Code Here

         assertEquals("value", cache.get(fqn.toString(), new Integer(i)));
      }

      for (int i = 0; i < 100; i++)
      {
         event = region.takeLastEventNode();
         assertNotNull(event);
         assertEquals(fqn, event.getFqn());
         assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      }
View Full Code Here

         assertNotNull(event);
         assertEquals(fqn, event.getFqn());
         assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      }

      assertNull(region.takeLastEventNode());

      fqn = Fqn.fromString("/a/b");
      mc = MethodCallFactory.create(MethodDeclarations.putDataEraseMethodLocal, new Object[]{null, fqn, data, Boolean.FALSE, Boolean.FALSE});
      interceptor.invoke(mc);
      event = regionManager.getRegion(fqn.toString()).takeLastEventNode();
View Full Code Here

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.putKeyValMethodLocal,
            new Object[]{null, fqn, key, value, Boolean.FALSE});
      interceptor.invoke(mc);
      assertEquals("value", cache.get(fqn, key));
      EvictedEventNode event = region.takeLastEventNode();
      assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      assertEquals(1, event.getElementDifference());
      assertEquals(fqn, event.getFqn());
      assertEquals("value", cache.get(fqn, key));
      assertNull(region.takeLastEventNode());
View Full Code Here

      EvictedEventNode event = region.takeLastEventNode();
      assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      assertEquals(1, event.getElementDifference());
      assertEquals(fqn, event.getFqn());
      assertEquals("value", cache.get(fqn, key));
      assertNull(region.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.putFailFastKeyValueMethodLocal,
            new Object[]{null, fqn, key, value, Boolean.FALSE, new Long(1000)});
      interceptor.invoke(mc);
      assertEquals("value", cache.get(fqn, key));
View Full Code Here

      mc = MethodCallFactory.create(MethodDeclarations.putFailFastKeyValueMethodLocal,
            new Object[]{null, fqn, key, value, Boolean.FALSE, new Long(1000)});
      interceptor.invoke(mc);
      assertEquals("value", cache.get(fqn, key));
      event = region.takeLastEventNode();
      assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      assertEquals(1, event.getElementDifference());
      assertEquals(fqn, event.getFqn());
      assertEquals("value", cache.get(fqn, key));
      assertNull(region.takeLastEventNode());
View Full Code Here

      event = region.takeLastEventNode();
      assertEquals(EvictedEventNode.ADD_ELEMENT_EVENT, event.getEvent());
      assertEquals(1, event.getElementDifference());
      assertEquals(fqn, event.getFqn());
      assertEquals("value", cache.get(fqn, key));
      assertNull(region.takeLastEventNode());

   }

   public void testRemoveNode() throws Throwable
   {
View Full Code Here

            null, fqn, Boolean.FALSE});
      interceptor.invoke(mc);

      assertEquals(0, cache.get(fqn).numAttributes());
      Region region = regionManager.getRegion(fqn.toString());
      EvictedEventNode event = region.takeLastEventNode();
      assertEquals(EvictedEventNode.REMOVE_NODE_EVENT, event.getEvent());
      assertEquals(fqn, event.getFqn());
      assertNull(region.takeLastEventNode());

      mc = MethodCallFactory.create(MethodDeclarations.removeNodeMethodLocal, new Object[]{
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.