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

         while (object instanceof PrepareCommand)
         {
            PrepareCommand command = (PrepareCommand)object;
            if (! txLog.hasPendingPrepare(command))
            {
               InvocationContext ctx = container.get();
               ctx.setOriginLocal(false);
               ctx.getOptionOverrides().setCacheModeLocal(true);
               ctx.getOptionOverrides().setSkipCacheStatusCheck(true);
               chain.invoke(ctx, command);
            }
            object = cache.getMarshaller().objectFromObjectStream(ois);
         }
         verifyMarker(object);
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

      {
         List<WriteCommand> mods = ((LogEntry)object).getModifications();
         if (trace) log.trace("Mods = " + mods);
         for (WriteCommand mod : mods)
         {
            InvocationContext ctx = container.get();
            ctx.setOriginLocal(false);
            ctx.getOptionOverrides().setCacheModeLocal(true);
            ctx.getOptionOverrides().setSkipCacheStatusCheck(true);
            chain.invoke(ctx, mod);
         }

         object = cache.getMarshaller().objectFromObjectStream(ois);
      }
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

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.