org.infinispan.commands.tx.PrepareCommand Maven / Gradle / Ivy
package org.infinispan.commands.tx;
import org.infinispan.commands.Visitor;
import org.infinispan.commands.write.ApplyDeltaCommand;
import org.infinispan.commands.write.ClearCommand;
import org.infinispan.commands.write.DataWriteCommand;
import org.infinispan.commands.write.PutKeyValueCommand;
import org.infinispan.commands.write.PutMapCommand;
import org.infinispan.commands.write.RemoveCommand;
import org.infinispan.commands.write.ReplaceCommand;
import org.infinispan.commands.write.WriteCommand;
import org.infinispan.commons.hash.Hash;
import org.infinispan.commons.hash.MurmurHash3;
import org.infinispan.commons.util.InfinispanCollections;
import org.infinispan.context.InvocationContext;
import org.infinispan.context.impl.RemoteTxInvocationContext;
import org.infinispan.context.impl.TxInvocationContext;
import org.infinispan.notifications.cachelistener.CacheNotifier;
import org.infinispan.transaction.impl.RemoteTransaction;
import org.infinispan.transaction.xa.GlobalTransaction;
import org.infinispan.transaction.xa.recovery.RecoveryManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Command corresponding to the 1st phase of 2PC.
*
* @author Manik Surtani ([email protected])
* @author [email protected]
* @since 4.0
*/
public class PrepareCommand extends AbstractTransactionBoundaryCommand {
private static final Log log = LogFactory.getLog(PrepareCommand.class);
private boolean trace = log.isTraceEnabled();
public static final byte COMMAND_ID = 12;
protected WriteCommand[] modifications;
protected boolean onePhaseCommit;
protected CacheNotifier notifier;
protected RecoveryManager recoveryManager;
private transient boolean replayEntryWrapping = false;
private static final WriteCommand[] EMPTY_WRITE_COMMAND_ARRAY = new WriteCommand[0];
private static final Object[] EMPTY_ARRAY = new Object[0];
private static final Comparator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy