All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commands.tx.totalorder.TotalOrderCommitCommand Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.commands.tx.totalorder;

import org.infinispan.commands.tx.CommitCommand;
import org.infinispan.transaction.impl.RemoteTransaction;
import org.infinispan.transaction.xa.GlobalTransaction;
import org.infinispan.util.ByteString;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;

/**
 * Commit Command used in the 2nd phase of 2PC. This command is used when non versioned entries are needed
 *
 * @author Pedro Ruivo
 * @since 5.3
 */
public class TotalOrderCommitCommand extends CommitCommand {

   public static final byte COMMAND_ID = 35;
   private static final Log log = LogFactory.getLog(TotalOrderCommitCommand.class);

   public TotalOrderCommitCommand(ByteString cacheName, GlobalTransaction gtx) {
      super(cacheName, gtx);
   }

   public TotalOrderCommitCommand(ByteString cacheName) {
      super(cacheName);
   }

   private TotalOrderCommitCommand() {
      super(null); // For command id uniqueness test
   }

   @Override
   public byte getCommandId() {
      return COMMAND_ID;
   }

   @Override
   protected RemoteTransaction getRemoteTransaction() {
      return txTable.getOrCreateRemoteTransaction(globalTx, null);
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy