org.infinispan.atomic.impl.AtomicHashMapProxy Maven / Gradle / Ivy
package org.infinispan.atomic.impl;
import org.infinispan.AdvancedCache;
import org.infinispan.atomic.AtomicMap;
import org.infinispan.atomic.AtomicMapLookup;
import org.infinispan.batch.AutoBatchSupport;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.container.entries.CacheEntry;
import org.infinispan.context.Flag;
import org.infinispan.marshall.core.MarshalledValue;
import org.infinispan.transaction.LockingMode;
import org.infinispan.transaction.TransactionMode;
import org.infinispan.transaction.impl.LocalTransaction;
import org.infinispan.transaction.impl.TransactionTable;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
/**
* A layer of indirection around an {@link AtomicHashMap} to provide consistency and isolation for concurrent readers
* while writes may also be going on. The techniques used in this implementation are very similar to the lock-free
* reader MVCC model used in the {@link org.infinispan.container.entries.MVCCEntry} implementations for the core data
* container, which closely follow software transactional memory approaches to dealing with concurrency.
*
* Implementations of this class are rarely created on their own; {@link AtomicHashMap#getProxy(AdvancedCache, Object)}
* should be used to retrieve an instance of this proxy.
*
* Typically proxies are only created by the {@link AtomicMapLookup} helper, and would not be created by end-user code
* directly.
*
* @param the type of keys maintained by this map
* @param the type of mapped values
* @author Manik Surtani
* @see AtomicHashMap
* @since 4.0
*/
public class AtomicHashMapProxy extends AutoBatchSupport implements AtomicMap {
protected final Object deltaMapKey;
protected final AdvancedCache
© 2015 - 2025 Weber Informatics LLC | Privacy Policy