Package org.jboss.cache.marshall

Examples of org.jboss.cache.marshall.MethodCall


   {
      if (!isCacheReady() || !cache.getInvocationContext().isOriginLocal()) return Collections.emptySet();
      lock.acquireLock(fqn, true);
      try
      {
         MethodCall call = MethodCallFactory.create(MethodDeclarations.getChildrenNamesMethodLocal_id, fqn);
         Object resp = callRemote(call);
         return (Set) resp;
      }
      finally
      {
View Full Code Here


   private Object callRemote(MethodCall call) throws Exception
   {
      if (log.isTraceEnabled()) log.trace("cache=" + cache.getLocalAddress() + "; calling with " + call);
      List<Address> mbrs = cache.getMembers();
      MethodCall clusteredGet = MethodCallFactory.create(MethodDeclarations.clusteredGetMethod_id, call, false);
      List resps = null;
      // JBCACHE-1186
      resps = cache.getRPCManager().callRemoteMethods(mbrs, clusteredGet, GroupRequest.GET_ALL, true, config.getTimeout(), new ResponseValidityFilter(mbrs, cache.getLocalAddress()), false);

      if (resps == null)
View Full Code Here

   public void testVisitNode() throws Throwable
   {
      // make sure node that doesn't exist does not result in a node visit event.

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.getNodeMethodLocal_id,
            Fqn.fromString(fqn1));
      interceptor.invoke(InvocationContext.fromMethodCall(mc));
      Region regionABC = regionManager.getRegion(fqn1, false);
      assertNull(regionABC.takeLastEventNode());
View Full Code Here

   {
      // make sure a get/visit on an empty node and empty element results in no cache events being added to event queue
      // aka MarshRegion.
      Fqn fqn = Fqn.fromString(fqn4);
      Object key = "key";
      MethodCall mc = MethodCallFactory.create(MethodDeclarations.getKeyValueMethodLocal_id, fqn, key, false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));
      Region region = regionManager.getRegion(fqn.toString(), false);
      assertNull(region.takeLastEventNode());

      // add the node but try to get on a null element should result in no cache events being added to Region.
View Full Code Here

      }

      // this region is node granularity
      Fqn fqn = Fqn.fromString("/a/b/c");

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal_id, null, fqn, data, false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));

      Region region = regionManager.getRegion(fqn.toString(), false);
      EvictedEventNode event = region.takeLastEventNode();
View Full Code Here

      Fqn fqn = Fqn.fromString("/d/e/f");
      Region region = regionManager.getRegion(fqn.toString(), false);
      Object key = "key";
      Object value = "value";

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.putKeyValMethodLocal_id,
            null, fqn, key, value, false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));
      assertEquals("value", cache.peek(fqn, false, false).getDirect(key));
      EvictedEventNode event = region.takeLastEventNode();
      assertEquals(NodeEventType.ADD_ELEMENT_EVENT, event.getEventType());
View Full Code Here

   {
      Fqn fqn = Fqn.fromString("/a/b/c");
      putQuietly(fqn, "a", "b");
      putQuietly(fqn, "b", "c");

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.removeDataMethodLocal_id, null, fqn, false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));

      assertEquals(0, cache.peek(fqn, false, false).getDataDirect().size());
      Region region = regionManager.getRegion(fqn.toString(), false);
      EvictedEventNode event = region.takeLastEventNode();
View Full Code Here

   {
      Fqn fqn = Fqn.fromString("/a/b/c");
      putQuietly(fqn, "a", "b");
      putQuietly(fqn, "b", "c");

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.removeKeyMethodLocal_id,
            null, fqn, "a", false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));

      assertNull(cache.get(fqn, "a"));
      Region region = regionManager.getRegion(fqn.toString(), false);
View Full Code Here

      }

      // this region is node granularity
      Fqn fqn = Fqn.fromString("/a/b/c");

      MethodCall mc = MethodCallFactory.create(MethodDeclarations.putDataMethodLocal_id, null, fqn, data, false);
      interceptor.invoke(InvocationContext.fromMethodCall(mc));

      Region region = regionManager.getRegion(fqn.toString(), false);
      EvictedEventNode event = region.takeLastEventNode();
View Full Code Here

      // create a compensating method call (reverting the effect of
      // this modification) and put it into the TX's undo list.
      if (tx != null && create_undo_ops)
      {
         // erase and set to previous hashmap contents
         MethodCall undo_op = MethodCallFactory.create(MethodDeclarations.putDataEraseMethodLocal_id, tx, fqn, new HashMap(rawData), false, true);
         transactionTable.addUndoOperation(tx, undo_op);
      }

      if (erase_contents)
         n.clearDataDirect();
View Full Code Here

TOP

Related Classes of org.jboss.cache.marshall.MethodCall

Copyright © 2018 www.massapicom. 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.