Package com.linkedin.venice.utils.locks
Class ClusterLockManager
java.lang.Object
com.linkedin.venice.utils.locks.ClusterLockManager
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
createStoreReadLock
(String storeName) createStoreWriteLock
(String storeName) createStoreWriteLockOnly
(String storeName)
-
Constructor Details
-
ClusterLockManager
-
-
Method Details
-
createClusterWriteLock
-
createClusterReadLock
-
createStoreReadLock
-
createStoreWriteLock
-
createStoreWriteLockOnly
-
clear
public void clear()
-