Class ClusterLockManager


  • public class ClusterLockManager
    extends java.lang.Object
    A centralized place to control the locking behavior, such as lock order and lock granularity. There is 1-1 mapping between ClusterLockManager instances and clusters. One instance only manages locks for one cluster. Each instance has a pair of cluster-level read/write locks and multiple store-level read/write locks. Every store-level read/write lock will take cluster-level read lock first. Locking on the whole cluster, including whole cluster write operations or controller shutdown, will take the cluster-level write lock.
    • Constructor Detail

      • ClusterLockManager

        public ClusterLockManager​(java.lang.String clusterName)
    • Method Detail

      • createStoreReadLock

        public AutoCloseableLock createStoreReadLock​(java.lang.String storeName)
      • createStoreWriteLock

        public AutoCloseableLock createStoreWriteLock​(java.lang.String storeName)
      • createStoreWriteLockOnly

        public AutoCloseableLock createStoreWriteLockOnly​(java.lang.String storeName)
      • clear

        public void clear()