Examples of PutDataMapCommand


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

   public void setUp() throws Exception
   {

      byteStream = new ByteArrayOutputStream();
      stream = new ObjectOutputStream(byteStream);
      command1 = new PutDataMapCommand(null, Fqn.ROOT, null);

      list = new ArrayList<WriteCommand>(2);
      list.add(command1);
      list.add(new PutDataMapCommand(null, Fqn.ROOT, null));
      prepareComand = new PrepareCommand(null, list, null, true);

      CacheMarshaller210 cm210 = new CacheMarshaller210();
      CommandsFactory factory = new CommandsFactoryImpl();
      cm210.injectCommandsFactory(factory);
View Full Code Here

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

   private void invokePut(Fqn fqn, Map<? extends K, ? extends V> data, boolean erase)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(null, fqn, data);
      command.setErase(erase);
      invoker.invoke(ctx, command);
   }
View Full Code Here

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

         boolean needToReverseRemove = reverseRemoveCheck && childNode.isDeleted() && transactionContext != null && transactionContext.getRemovedNodes().contains(fqn);
         if (!needToReverseRemove) return;
         childNode.markAsDeleted(false);
         //if we'll rollback the tx data should be added to the node again
         Map oldData = new HashMap(childNode.getDataDirect());
         PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(ctx.getGlobalTransaction(), fqn, oldData);
         // txTable.get(gtx).addUndoOperation(command); --- now need to make sure this is added to the normal mods list instead
         transactionContext.addModification(command);
         //we're prepared for rollback, now reset the node
         childNode.clearDataDirect();
         if (createdNodes != null)
View Full Code Here

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

   }

   @Override
   public PutDataMapCommand buildPutDataMapCommand(GlobalTransaction gtx, Fqn fqn, Map data)
   {
      PutDataMapCommand cmd = new PessPutDataMapCommand(gtx, fqn, data);
      cmd.initialize(notifier, dataContainer);
      return cmd;
   }
View Full Code Here

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

         case PutDataMapCommand.METHOD_ID:
         case PutDataMapCommand.ERASE_METHOD_ID:
         case PutDataMapCommand.ERASE_VERSIONED_METHOD_ID:
         case PutDataMapCommand.VERSIONED_METHOD_ID:
         {
            PutDataMapCommand returnValue = new PessPutDataMapCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case PutKeyValueCommand.METHOD_ID:
         case PutKeyValueCommand.VERSIONED_METHOD_ID:
         {
            PutKeyValueCommand returnValue = new PessPutKeyValueCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case PutForExternalReadCommand.METHOD_ID:
         case PutForExternalReadCommand.VERSIONED_METHOD_ID:
         {
            PutForExternalReadCommand returnValue = new PessPutForExternalReadCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case ClearDataCommand.METHOD_ID:
         case ClearDataCommand.VERSIONED_METHOD_ID:
         {
            ClearDataCommand returnValue = new PessClearDataCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case RemoveKeyCommand.METHOD_ID:
         case RemoveKeyCommand.VERSIONED_METHOD_ID:
         {
            RemoveKeyCommand returnValue = new PessRemoveKeyCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }

         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

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

   public void setUp() throws Exception
   {

      byteStream = new ByteArrayOutputStream();
      stream = new ObjectOutputStream(byteStream);
      command1 = new PutDataMapCommand(null, Fqn.ROOT, null);

      list = new ArrayList<WriteCommand>(2);
      list.add(command1);
      list.add(new PutDataMapCommand(null, Fqn.ROOT, null));
      prepareComand = new PrepareCommand(null, list, null, true);

      CacheMarshaller210 cm210 = new CacheMarshaller210();
      CommandsFactory factory = new CommandsFactoryImpl();
      cm210.injectCommandsFactory(factory);
View Full Code Here

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

      this.buddyFqnTransformer = buddyFqnTransformer;
   }

   public PutDataMapCommand buildPutDataMapCommand(GlobalTransaction gtx, Fqn fqn, Map data)
   {
      PutDataMapCommand cmd = new PutDataMapCommand(gtx, fqn, data);
      cmd.initialize(notifier, dataContainer);
      return cmd;
   }
View Full Code Here

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

         case PutDataMapCommand.METHOD_ID:
         case PutDataMapCommand.ERASE_METHOD_ID:
         case PutDataMapCommand.ERASE_VERSIONED_METHOD_ID:
         case PutDataMapCommand.VERSIONED_METHOD_ID:
         {
            PutDataMapCommand returnValue = new PutDataMapCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case PutKeyValueCommand.METHOD_ID:
         case PutKeyValueCommand.VERSIONED_METHOD_ID:
         {
            PutKeyValueCommand returnValue = new PutKeyValueCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case PutForExternalReadCommand.METHOD_ID:
         case PutForExternalReadCommand.VERSIONED_METHOD_ID:
         {
            PutForExternalReadCommand returnValue = new PutForExternalReadCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case ClearDataCommand.METHOD_ID:
         case ClearDataCommand.VERSIONED_METHOD_ID:
         {
            ClearDataCommand returnValue = new ClearDataCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }
         case RemoveKeyCommand.METHOD_ID:
         case RemoveKeyCommand.VERSIONED_METHOD_ID:
         {
            RemoveKeyCommand returnValue = new RemoveKeyCommand();
            returnValue.initialize(notifier, dataContainer);
            command = returnValue;
            break;
         }

         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

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

   public void put(Fqn fqn, Map<? extends K, ? extends V> data)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(null, fqn, data);
      invoker.invoke(ctx, command);
   }
View Full Code Here

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

         PutKeyValueCommand putKeyCommand = (PutKeyValueCommand) command;
         if (putKeyCommand.getKey().equals(config.getExpirationKeyName())) {
            return (Long) putKeyCommand.getValue();
         }
      } else if (command instanceof PutDataMapCommand) {
         PutDataMapCommand putDataCommand = (PutDataMapCommand) command;
         Object expiration = putDataCommand.getData().get(config.getExpirationKeyName());
         if (expiration != null) {
            return (Long) expiration;
         }
      }
      return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.