org.infinispan.interceptors.distribution.L1WriteSynchronizer Maven / Gradle / Ivy
package org.infinispan.interceptors.distribution;
import static org.infinispan.commons.util.Util.toStr;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import org.infinispan.container.DataContainer;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.interceptors.locking.ClusteringDependentLogic;
import org.infinispan.metadata.Metadata;
import org.infinispan.metadata.impl.L1Metadata;
import org.infinispan.statetransfer.StateTransferLock;
import org.jboss.logging.Logger;
/**
* A write synchronizer that allows for a single thread to run the L1 update while others can block until it is
* completed. Also allows for someone to attempt to cancel the write to the L1. If they are unable to, they should
* really wait until the L1 write has completed so they can guarantee their update will be ordered properly.
*
* @author wburns
* @since 6.0
*/
public class L1WriteSynchronizer {
private static final Logger log = Logger.getLogger(L1WriteSynchronizer.class);
private final L1WriteSync sync = new L1WriteSync();
private final long l1Lifespan;
private final DataContainer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy