Package org.apache.solr.cloud
Class ConfigSetApiLockFactory
- java.lang.Object
-
- org.apache.solr.cloud.ConfigSetApiLockFactory
-
public class ConfigSetApiLockFactory extends Object
This class implements a higher level locking abstraction for the Config Set API using lower level read and write locks.
-
-
Constructor Summary
Constructors Constructor Description ConfigSetApiLockFactory(DistributedConfigSetLockFactory lockFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DistributedMultiLock
createConfigSetApiLock(String configSetName, String baseConfigSetName)
For theCollectionParams.LockLevel
of the passedaction
, obtains the required locks (if any) and returns.
-
-
-
Constructor Detail
-
ConfigSetApiLockFactory
public ConfigSetApiLockFactory(DistributedConfigSetLockFactory lockFactory)
-
-
Method Detail
-
createConfigSetApiLock
public DistributedMultiLock createConfigSetApiLock(String configSetName, String baseConfigSetName)
For theCollectionParams.LockLevel
of the passedaction
, obtains the required locks (if any) and returns.This method obtains a write lock on
configSetName
as 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.
-
-