org.infinispan.transaction.totalorder.TotalOrderManager Maven / Gradle / Ivy
package org.infinispan.transaction.totalorder;
import org.infinispan.commons.util.CollectionFactory;
import org.infinispan.factories.KnownComponentNames;
import org.infinispan.factories.annotations.ComponentName;
import org.infinispan.factories.annotations.Inject;
import org.infinispan.transaction.impl.TotalOrderRemoteTransactionState;
import org.infinispan.util.concurrent.BlockingTaskAwareExecutorService;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicReference;
/**
* This class behaves as a synchronization point between incoming transactions (totally ordered) and between incoming
* transactions and state transfer.
*
* Main functions:
*
* -
* ensure an order between prepares before sending them to the thread pool, i.e. non-conflicting
* prepares can be processed concurrently;
*
* -
* ensure that the state transfer waits for the previous delivered prepares;
*
* -
* ensure that the prepare waits for state transfer in progress.
*
*
*
* @author Pedro Ruivo
* @since 5.3
*/
public class TotalOrderManager {
private static final Log log = LogFactory.getLog(TotalOrderManager.class);
/**
* this map is used to keep track of concurrent transactions.
*/
private final ConcurrentMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy