Examples of PrepareCommand


Examples of com.impossibl.postgres.protocol.PrepareCommand

        cursorName = name = null;
      }

    }

    PrepareCommand prep = connection.getProtocol().createPrepare(name, sqlText.toString(), Collections.<Type> emptyList());

    SQLWarning warningChain = connection.execute(prep, true);

    resultFields = prep.getDescribedResultFields();

    return warningChain;
  }
View Full Code Here

Examples of org.apache.axis2.clustering.configuration.commands.PrepareCommand

        if (log.isDebugEnabled()) {
            log.debug("Enter: DefaultConfigurationManager::prepare");
        }

        PrepareCommand command = new PrepareCommand();
        send(command);

        if (log.isDebugEnabled()) {
            log.debug("Exit: DefaultConfigurationManager::prepare");
        }
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

   public void logPrepare(PrepareCommand command) {
      pendingPrepares.put(command.getGlobalTransaction(), command);
   }

   public void logCommit(GlobalTransaction gtx) {
      PrepareCommand command = pendingPrepares.remove(gtx);
      // it is perfectly normal for a prepare not to be logged for this gtx, for example if a transaction did not
      // modify anything, then beforeCompletion() is not invoked and logPrepare() will not be called to register the
      // prepare.
      if (command != null && isActive()) addEntry(gtx, command.getModifications());
   }
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

      EvictCommand command = new EvictCommand(key, notifier);
      return command;
   }

   public PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List<WriteCommand> modifications, boolean onePhaseCommit) {
      PrepareCommand command = new PrepareCommand(gtx, modifications, onePhaseCommit);
      command.setCacheName(cacheName);
      return command;
   }
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

         case InvalidateL1Command.COMMAND_ID:
            InvalidateL1Command ilc = (InvalidateL1Command) c;
            ilc.init(distributionManager, notifier);
            break;
         case PrepareCommand.COMMAND_ID:
            PrepareCommand pc = (PrepareCommand) c;
            pc.init(interceptorChain, icc, txTable);
            pc.initialize(notifier);
            if (pc.getModifications() != null)
               for (ReplicableCommand nested : pc.getModifications()) initializeReplicableCommand(nested);
            break;
         case CommitCommand.COMMAND_ID:
            CommitCommand commitCommand = (CommitCommand) c;
            commitCommand.init(interceptorChain, icc, txTable);
            break;
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

         switch (id) {
            case LockControlCommand.COMMAND_ID:
               command = new LockControlCommand(cacheName);
               break;
            case PrepareCommand.COMMAND_ID:
               command = new PrepareCommand(cacheName);
               break;
            case VersionedPrepareCommand.COMMAND_ID:
               command = new VersionedPrepareCommand(cacheName);
               break;
            case TotalOrderNonVersionedPrepareCommand.COMMAND_ID:
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

   }

   private BackupResponse sendTo1PCBackups(CommitCommand command) throws Exception {
      List<XSiteBackup> backups = calculateBackupInfo(BackupFilter.KEEP_1PC_ONLY);
      LocalTransaction localTx = txTable.getLocalTransaction(command.getGlobalTransaction());
      PrepareCommand prepare = new PrepareCommand(cacheName, localTx.getGlobalTransaction(),
                                                  localTx.getModifications(), true);
      return backupCommand(prepare, backups);
   }
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

                  }

                  if (!resendTo.isEmpty()) {
                     log.debugf("Need to resend prepares for %s to %s", command.getGlobalTransaction(), resendTo);
                     // Make sure this is 1-Phase!!
                     PrepareCommand pc = cf.buildPrepareCommand(command.getGlobalTransaction(), ctx.getModifications(), true);
                     rpcManager.invokeRemotely(resendTo, pc, true, true);
                  }
               }
               break;
            } catch (RehashInProgressException e) {
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

      if (trace)
         log.trace("Retrieving/Applying pending prepares");
      Object object = marshaller.objectFromObjectStream(oi);
      while (object instanceof PrepareCommand) {
         PrepareCommand command = (PrepareCommand) object;

         if (!transactionLog.hasPendingPrepare(command)) {
            if (trace) log.tracef("Applying pending prepare %s", command);
            commandsFactory.initializeReplicableCommand(command, false);
            RemoteTxInvocationContext ctx = invocationContextContainer.createRemoteTxInvocationContext(null /* No idea if this right PLM */);
            RemoteTransaction transaction = txTable.createRemoteTransaction(command.getGlobalTransaction(), command.getModifications());
            ctx.setRemoteTransaction(transaction);
            ctx.setFlags(CACHE_MODE_LOCAL, Flag.SKIP_CACHE_STATUS_CHECK);
            interceptorChain.invoke(ctx, command);
         } else {
            if (trace) log.tracef("Prepare %s not in tx log; not applying", command);
View Full Code Here

Examples of org.infinispan.commands.tx.PrepareCommand

                  }

                  if (!resendTo.isEmpty()) {
                     log.debugf("Need to resend prepares for %s to %s", command.getGlobalTransaction(), resendTo);
                     // Make sure this is 1-Phase!!
                     PrepareCommand pc = cf.buildPrepareCommand(command.getGlobalTransaction(), ctx.getModifications(), true);
                     rpcManager.invokeRemotely(resendTo, pc, true, true);
                  }
               }
               break;
            } catch (RehashInProgressException e) {
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.