Package org.jboss.cache.commands.write

Examples of org.jboss.cache.commands.write.RemoveNodeCommand


      else
      {
         InvocationContext ctx = invocationContextContainer.get();
         cacheStatusCheck(ctx);
         GlobalTransaction tx = transactionTable.getCurrentTransaction();
         RemoveNodeCommand command = commandsFactory.buildRemoveNodeCommand(tx, fqn);
         Object retval = invoker.invoke(ctx, command);
         return retval != null && (Boolean) retval;
      }
   }
View Full Code Here


   }

   @Override
   public RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx, Fqn fqn)
   {
      RemoveNodeCommand cmd = new PessRemoveNodeCommand(gtx, fqn);
      cmd.initialize(notifier, dataContainer);
      return cmd;
   }
View Full Code Here

         }

         case RemoveNodeCommand.METHOD_ID:
         case RemoveNodeCommand.VERSIONED_METHOD_ID:
         {
            RemoveNodeCommand returnValue = new PessRemoveNodeCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case InvalidateCommand.METHOD_ID:
         {
            InvalidateCommand returnValue = new InvalidateCommand(null);
            returnValue.initialize(cacheSpi, dataContainer, notifier);
            command = returnValue;
            break;
         }
         default:
            // pass up to superclass
View Full Code Here

      return command;
   }

   public RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx, Fqn fqn)
   {
      RemoveNodeCommand cmd = new RemoveNodeCommand(gtx, fqn);
      cmd.initialize(notifier, dataContainer);
      return cmd;
   }
View Full Code Here

         }

         case RemoveNodeCommand.METHOD_ID:
         case RemoveNodeCommand.VERSIONED_METHOD_ID:
         {
            RemoveNodeCommand returnValue = new RemoveNodeCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case CreateNodeCommand.METHOD_ID:
         {
            throw new UnsupportedOperationException("CreateNodeCommand is not supported in MVCC!");
         }
         // --- transactional method calls

         case PrepareCommand.METHOD_ID:
         {
            command = new PrepareCommand();
            break;
         }

         case OptimisticPrepareCommand.METHOD_ID:
         {
            command = new OptimisticPrepareCommand();
            break;
         }

         case CommitCommand.METHOD_ID:
         {
            command = new CommitCommand();
            break;
         }

         case RollbackCommand.METHOD_ID:
         {
            command = new RollbackCommand();
            break;
         }

         // --- replicate methods
         case ReplicateCommand.MULTIPLE_METHOD_ID:
         case ReplicateCommand.SINGLE_METHOD_ID:
         {
            ReplicateCommand returnValue = new ReplicateCommand();
            returnValue.initialize(invoker);
            command = returnValue;
            break;
         }

         case InvalidateCommand.METHOD_ID:
         {
            InvalidateCommand returnValue = new InvalidateCommand();
            returnValue.initialize(cacheSpi, dataContainer, notifier);
            command = returnValue;
            break;
         }

         case ClusteredGetCommand.METHOD_ID:
         {
            ClusteredGetCommand returnValue = new ClusteredGetCommand();
            returnValue.initialize(dataContainer, invoker);
            command = returnValue;
            break;
         }
         // ---- Buddy replication - group organisation commands
         case AnnounceBuddyPoolNameCommand.METHOD_ID:
         {
            AnnounceBuddyPoolNameCommand returnValue = new AnnounceBuddyPoolNameCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case AssignToBuddyGroupCommand.METHOD_ID:
         {
            AssignToBuddyGroupCommand returnValue = new AssignToBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case RemoveFromBuddyGroupCommand.METHOD_ID:
         {
            RemoveFromBuddyGroupCommand returnValue = new RemoveFromBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case DataGravitationCleanupCommand.METHOD_ID:
         {
            DataGravitationCleanupCommand returnValue = new DataGravitationCleanupCommand();
            returnValue.initialize(buddyManager, invoker, transactionTable, this, dataContainer, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         case GravitateDataCommand.METHOD_ID:
         {
            GravitateDataCommand returnValue = new GravitateDataCommand(rpcManager.getLocalAddress());
            returnValue.initialize(dataContainer, cacheSpi, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         default:
            throw new CacheException("Unknown command id " + id + "!");
View Full Code Here

    * Returns true if such a node was removed.
    */
   private boolean executeRemove(GlobalTransaction gtx, Fqn toRemove) throws Throwable
   {
      Object result;
      RemoveNodeCommand removeBackupCommand = commandsFactory.buildRemoveNodeCommand(gtx, toRemove);

      InvocationContext ctx = invoker.getInvocationContext();
      ctx.getOptionOverrides().setCacheModeLocal(true);
      result = invoker.invoke(ctx, removeBackupCommand);
      return result != null && (Boolean) result;
View Full Code Here

      else
      {
         InvocationContext ctx = invocationContextContainer.get();
         cacheStatusCheck(ctx);
         GlobalTransaction tx = transactionTable.getCurrentTransaction();
         RemoveNodeCommand command = commandsFactory.buildRemoveNodeCommand(tx, fqn);
         Object retval = invoker.invoke(ctx, command);
         return retval != null && (Boolean) retval;
      }
   }
View Full Code Here

      return command;
   }

   public RemoveNodeCommand buildRemoveNodeCommand(GlobalTransaction gtx, Fqn fqn)
   {
      RemoveNodeCommand cmd = new RemoveNodeCommand(gtx, fqn);
      cmd.initialize(notifier, dataContainer);
      return cmd;
   }
View Full Code Here

         }

         case RemoveNodeCommand.METHOD_ID:
         case RemoveNodeCommand.VERSIONED_METHOD_ID:
         {
            RemoveNodeCommand returnValue = new RemoveNodeCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case CreateNodeCommand.METHOD_ID:
         {
            throw new UnsupportedOperationException("CreateNodeCommand is not supported in MVCC!");
         }
         // --- transactional method calls

         case PrepareCommand.METHOD_ID:
         {
            command = new PrepareCommand();
            break;
         }

         case OptimisticPrepareCommand.METHOD_ID:
         {
            command = new OptimisticPrepareCommand();
            break;
         }

         case CommitCommand.METHOD_ID:
         {
            command = new CommitCommand();
            break;
         }

         case RollbackCommand.METHOD_ID:
         {
            command = new RollbackCommand();
            break;
         }

         // --- replicate methods
         case ReplicateCommand.MULTIPLE_METHOD_ID:
         case ReplicateCommand.SINGLE_METHOD_ID:
         {
            ReplicateCommand returnValue = new ReplicateCommand();
            returnValue.initialize(invoker);
            command = returnValue;
            break;
         }

         case InvalidateCommand.METHOD_ID:
         {
            InvalidateCommand returnValue = new InvalidateCommand();
            returnValue.initialize(cacheSpi, dataContainer, notifier);
            command = returnValue;
            break;
         }

         case ClusteredGetCommand.METHOD_ID:
         {
            ClusteredGetCommand returnValue = new ClusteredGetCommand();
            returnValue.initialize(dataContainer, invoker);
            command = returnValue;
            break;
         }
         // ---- Buddy replication - group organisation commands
         case AnnounceBuddyPoolNameCommand.METHOD_ID:
         {
            AnnounceBuddyPoolNameCommand returnValue = new AnnounceBuddyPoolNameCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case AssignToBuddyGroupCommand.METHOD_ID:
         {
            AssignToBuddyGroupCommand returnValue = new AssignToBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case RemoveFromBuddyGroupCommand.METHOD_ID:
         {
            RemoveFromBuddyGroupCommand returnValue = new RemoveFromBuddyGroupCommand();
            returnValue.initialize(buddyManager);
            command = returnValue;
            break;
         }
         case DataGravitationCleanupCommand.METHOD_ID:
         {
            DataGravitationCleanupCommand returnValue = new DataGravitationCleanupCommand();
            returnValue.initialize(buddyManager, invoker, transactionTable, this, dataContainer, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         case GravitateDataCommand.METHOD_ID:
         {
            GravitateDataCommand returnValue = new GravitateDataCommand(rpcManager.getLocalAddress());
            returnValue.initialize(dataContainer, cacheSpi, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         case StateTransferControlCommand.METHOD_ID:
         {
View Full Code Here

    * Returns true if such a node was removed.
    */
   private boolean executeRemove(GlobalTransaction gtx, Fqn toRemove) throws Throwable
   {
      Object result;
      RemoveNodeCommand removeBackupCommand = commandsFactory.buildRemoveNodeCommand(gtx, toRemove);

      InvocationContext ctx = invoker.getInvocationContext();
      ctx.getOptionOverrides().setCacheModeLocal(true);
      result = invoker.invoke(ctx, removeBackupCommand);
      return result != null && (Boolean) result;
View Full Code Here

TOP

Related Classes of org.jboss.cache.commands.write.RemoveNodeCommand

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.