Package org.jboss.cache

Examples of org.jboss.cache.InvocationContext


      }
   }

   private void assertInvocationContextInitState(Cache c)
   {
      InvocationContext ctx = c.getInvocationContext();
      InvocationContext control;
      control = ctx.copy();

      control.reset();

      assertEquals("Should be equal", control, ctx);
   }
View Full Code Here


      command.initialize(container);
   }

   public void testPerform()
   {
      InvocationContext ctx = new MVCCInvocationContext();
      ctx.putLookedUpNode(testFqn, null);
      assert !((Boolean) command.perform(ctx));

      ctx.putLookedUpNode(testFqn, new NodeSpiMock(testFqn));

      assert Boolean.TRUE == command.perform(ctx);
   }
View Full Code Here

      Object callResults = null;
      try
      {
         if (trace) log.trace("Clustered get: invoking call with Fqn " + dataCommand.getFqn());
         InvocationContext ctx = interceptorChain.getInvocationContext();
         ctx.setOriginLocal(false);
         ctx.setBypassUnmarshalling(true);
         callResults = interceptorChain.invoke(ctx, dataCommand);
         Set mapCallRes;
         if (dataCommand instanceof GetChildrenNamesCommand && (mapCallRes = (Set) callResults) != null && mapCallRes.isEmpty())
            callResults = null;
         boolean found = validResult(callResults);
View Full Code Here

         Object ret;

         if (cmd instanceof VisitableCommand)
         {
            InvocationContext ctx = invocationContextContainer.get();
            ctx.setOriginLocal(false);
            if (!componentRegistry.invocationsAllowed(false))
            {
               return new RequestIgnoredResponse();
            }
            ret = interceptorChain.invoke(ctx, (VisitableCommand) cmd);
View Full Code Here

   {
      if (!nodeCreatedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean originLocal = ctx.isOriginLocal();
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(originLocal);
         e.setPre(pre);
         e.setFqn(fqn);
View Full Code Here

      if (!nodeModifiedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean originLocal = ctx.isOriginLocal();
         Map dataCopy = copy(data, useMarshalledValueMaps);
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(originLocal);
         e.setPre(pre);
         e.setFqn(fqn);
View Full Code Here

      if (!nodeRemovedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean originLocal = ctx.isOriginLocal();
         Map dataCopy = copy(data, useMarshalledValueMaps);
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(originLocal);
         e.setPre(pre);
         e.setFqn(fqn);
View Full Code Here

   public void notifyNodeVisited(Fqn fqn, boolean pre, InvocationContext ctx)
   {
      if (!nodeVisitedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setPre(pre);
         e.setFqn(fqn);
         e.setTransaction(tx);
View Full Code Here

   {
      if (!nodeMovedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean originLocal = ctx.isOriginLocal();
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(originLocal);
         e.setPre(pre);
         e.setFqn(originalFqn);
View Full Code Here

   {
      if (!nodeEvictedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         final boolean originLocal = ctx.isOriginLocal();
         Transaction tx = ctx.getTransaction();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(originLocal);
         e.setPre(pre);
         e.setFqn(fqn);
View Full Code Here

TOP

Related Classes of org.jboss.cache.InvocationContext

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.