Examples of LockControlCommand


Examples of org.infinispan.commands.control.LockControlCommand

               log.trace("Nothing to initialize for command: " + c);
      }
   }

   public LockControlCommand buildLockControlCommand(Collection keys, boolean implicit) {
      return new LockControlCommand(keys, cacheName, implicit);
   }
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

   public CacheRpcCommand fromStream(byte id, Object[] parameters, byte type, String cacheName) {
      CacheRpcCommand command;
      if (type == 0) {
         switch (id) {
            case LockControlCommand.COMMAND_ID:
               command = new LockControlCommand(cacheName);
               break;
            case PrepareCommand.COMMAND_ID:
               command = new PrepareCommand(cacheName);
               break;
            case CommitCommand.COMMAND_ID:
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

         case ClusteredGetCommand.COMMAND_ID:
            ClusteredGetCommand clusteredGetCommand = (ClusteredGetCommand) c;
            clusteredGetCommand.initialize(icc, this, interceptorChain, distributionManager);
            break;
         case LockControlCommand.COMMAND_ID:
            LockControlCommand lcc = (LockControlCommand) c;
            lcc.init(interceptorChain, icc, txTable);
            lcc.markTransactionAsRemote(isRemote);
            if (configuration.isEnableDeadlockDetection() && isRemote) {
               DldGlobalTransaction gtx = (DldGlobalTransaction) lcc.getGlobalTransaction();
               RemoteTransaction transaction = txTable.getRemoteTransaction(gtx);
               if (transaction != null) {
                  if (!configuration.getCacheMode().isDistributed()) {
                     Set<Object> keys = txTable.getLockedKeysForRemoteTransaction(gtx);
                     GlobalTransaction gtx2 = transaction.getGlobalTransaction();
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

            }
      }
   }

   public LockControlCommand buildLockControlCommand(Collection keys, boolean implicit, Set<Flag> flags) {
      return new LockControlCommand(keys, cacheName, flags, implicit);
   }
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

         case ClusteredGetCommand.COMMAND_ID:
            ClusteredGetCommand clusteredGetCommand = (ClusteredGetCommand) c;
            clusteredGetCommand.initialize(dataContainer, icc, this, interceptorChain);
            break;
         case LockControlCommand.COMMAND_ID:
            LockControlCommand lcc = (LockControlCommand) c;
            lcc.init(interceptorChain, icc, txTable);
            lcc.markTransactionAsRemote(isRemote);
            if (configuration.isEnableDeadlockDetection() && isRemote) {
               DldGlobalTransaction gtx = (DldGlobalTransaction) lcc.getGlobalTransaction();
               RemoteTransaction transaction = txTable.getRemoteTransaction(gtx);
               if (transaction != null) {
                  if (!configuration.getCacheMode().isDistributed()) {
                     Set<Object> keys = txTable.getLockedKeysForRemoteTransaction(gtx);
                     GlobalTransaction gtx2 = transaction.getGlobalTransaction();
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

               log.trace("Nothing to initialize for command: " + c);
      }
   }

   public LockControlCommand buildLockControlCommand(Collection keys, boolean implicit) {
      return new LockControlCommand(keys, cacheName, implicit);
   }
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

      switch (id) {
         case PutKeyValueCommand.COMMAND_ID:
            command = new PutKeyValueCommand();
            break;
         case LockControlCommand.COMMAND_ID:
            command = new LockControlCommand();
            break;
         case PutMapCommand.COMMAND_ID:
            command = new PutMapCommand();
            break;
         case RemoveCommand.COMMAND_ID:
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

      switch (id) {
         case PutKeyValueCommand.COMMAND_ID:
            command = new PutKeyValueCommand();
            break;
         case LockControlCommand.COMMAND_ID:
            command = new LockControlCommand();
            break;
         case PutMapCommand.COMMAND_ID:
            command = new PutMapCommand();
            break;
         case RemoveCommand.COMMAND_ID:
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

      if (keys == null || keys.isEmpty()) {
         throw new IllegalArgumentException("Cannot lock empty list of keys");
      }
      InvocationContext ctx = getInvocationContextForWrite(explicitClassLoader, UNBOUNDED, false);
      LockControlCommand command = commandsFactory.buildLockControlCommand((Collection<Object>) keys, explicitFlags);
      return (Boolean) invoker.invoke(ctx, command);
   }
View Full Code Here

Examples of org.infinispan.commands.control.LockControlCommand

         LocalTransaction localTransaction = (LocalTransaction) txContext.getCacheTransaction();
         if (localTransaction.getAffectedKeys().containsAll(keys)) {
            log.tracef("We already have lock for keys %s, skip remote lock acquisition", keys);
            return;
         } else {
            LockControlCommand lcc = cf.buildLockControlCommand(keys,
                  command.getFlags(), txContext.getGlobalTransaction());
            invokeNextInterceptor(ctx, lcc);
         }
      }
      ((TxInvocationContext) ctx).addAllAffectedKeys(keys);
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.