Package org.jboss.cache

Examples of org.jboss.cache.InvocationContext


      {
         if(log.isTraceEnabled())
         {
            log.trace("remove: cache id " +id.toString());
         }
         InvocationContext ictx = cache.getInvocationContext();
         ictx.setOptionOverrides(getGravitateOption());
         StatefulBeanContext ctx = (StatefulBeanContext) cache.get(id, "bean");

         if (ctx != null)
         {
            if (!ctx.isRemoved())
View Full Code Here


         cleanBeanRegion();

         try {
            // Remove locally. We do this to clean up the persistent store,
            // which is not affected by the region.deactivate call below.
            InvocationContext ctx = cache.getInvocationContext();
            ctx.setOptionOverrides(getLocalOnlyOption());
            cache.removeNode(cacheNode);
         }
         catch (CacheException e)
         {
            log.error("stop(): can't remove bean from the underlying distributed cache");
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

      {
         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

   {
      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.