Package org.jboss.cache

Examples of org.jboss.cache.InvocationContext


   {
      if (!nodeInvalidatedListeners.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


      if (!nodeLoadedListeners.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 (!nodeActivatedListeners.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 (!nodePassivatedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         Map dataCopy = copy(data, useMarshalledValueMaps);
         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

   public void notifyViewChange(final View newView, InvocationContext ctx)
   {
      if (!viewChangedListeners.isEmpty())
      {
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setNewView(newView);
         e.setType(VIEW_CHANGED);
         for (ListenerInvocation listener : viewChangedListeners) listener.invoke(e);
View Full Code Here

   public void notifyTransactionCompleted(Transaction transaction, boolean successful, InvocationContext ctx)
   {
      if (!transactionCompletedListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean isOriginLocal = ctx.isOriginLocal();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(isOriginLocal);
         e.setTransaction(transaction);
         e.setSuccessful(successful);
View Full Code Here

   public void notifyTransactionRegistered(Transaction transaction, InvocationContext ctx)
   {
      if (!transactionRegisteredListeners.isEmpty() && !ctx.getOptionOverrides().isSuppressEventNotification())
      {
         boolean isOriginLocal = ctx.isOriginLocal();
         InvocationContext backup = resetInvocationContext(ctx);
         EventImpl e = new EventImpl();
         e.setCache(cache);
         e.setOriginLocal(isOriginLocal);
         e.setTransaction(transaction);
         e.setType(TRANSACTION_REGISTERED);
View Full Code Here

      return useMarshalledValueMaps ? new MarshalledValueMap(defensivelyCopiedData) : defensivelyCopiedData;
   }

   private void restoreInvocationContext(InvocationContext backup)
   {
      InvocationContext currentIC = cache.getInvocationContext();
      backup.putLookedUpNodes(currentIC.getLookedUpNodes());
      cache.setInvocationContext(backup);
   }
View Full Code Here

   private InvocationContext resetInvocationContext(InvocationContext ctx)
   {
      // wipe current context.
      cache.setInvocationContext(null);
      // get a new Invocation Context
      InvocationContext newContext = cache.getInvocationContext();
      newContext.putLookedUpNodes(ctx.getLookedUpNodes());
      return ctx;
   }
View Full Code Here

         Object ret;

         if (cmd instanceof VisitableCommand)
         {
            InvocationContext ctx = invocationContextContainer.get();
            ctx.setOriginLocal(false);
            if (!componentRegistry.invocationsAllowed(false))
            {
               return new RequestIgnoredResponse();
            }
            try
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.