org.infinispan.transaction.impl.AbstractCacheTransaction Maven / Gradle / Ivy
package org.infinispan.transaction.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.infinispan.commands.write.WriteCommand;
import org.infinispan.commons.equivalence.Equivalence;
import org.infinispan.commons.util.CollectionFactory;
import org.infinispan.commons.util.InfinispanCollections;
import org.infinispan.container.entries.CacheEntry;
import org.infinispan.container.versioning.EntryVersion;
import org.infinispan.container.versioning.EntryVersionsMap;
import org.infinispan.container.versioning.IncrementableEntryVersion;
import org.infinispan.context.Flag;
import org.infinispan.transaction.xa.CacheTransaction;
import org.infinispan.transaction.xa.GlobalTransaction;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
import static org.infinispan.commons.util.Util.toStr;
/**
* Base class for local and remote transaction. Impl note: The aggregated modification list and lookedUpEntries are not
* instantiated here but in subclasses. This is done in order to take advantage of the fact that, for remote
* transactions we already know the size of the modifications list at creation time.
*
* @author [email protected]
* @author Galder Zamarreño
* @since 4.2
*/
public abstract class AbstractCacheTransaction implements CacheTransaction {
protected final GlobalTransaction tx;
private static Log log = LogFactory.getLog(AbstractCacheTransaction.class);
private static final boolean trace = log.isTraceEnabled();
private static final int INITIAL_LOCK_CAPACITY = 4;
protected volatile boolean hasLocalOnlyModifications;
protected volatile List modifications;
protected Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy