Package org.apache.solr.cloud
Class ConfigSetApiLockFactory
java.lang.Object
org.apache.solr.cloud.ConfigSetApiLockFactory
This class implements a higher level locking abstraction for the Config Set API using lower level
read and write locks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConfigSetApiLock(String configSetName, String baseConfigSetName) For theCollectionParams.LockLevelof the passedaction, obtains the required locks (if any) and returns.
-
Constructor Details
-
ConfigSetApiLockFactory
-
-
Method Details
-
createConfigSetApiLock
For theCollectionParams.LockLevelof the passedaction, obtains the required locks (if any) and returns.This method obtains a write lock on
configSetNameas well as (when notnull), a read lock onbaseConfigSetName.- Returns:
- a lock that once
DistributedMultiLock.isAcquired()guarantees the corresponding Config Set API command can execute safely. The returned lock MUST beDistributedMultiLock.release()no matter what once no longer needed as otherwise it would prevent other threads from locking.
-