- All Known Implementing Classes:
public interface DistributedConfigSetLockFactory
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
createLock(boolean isWriteLock, String configSetName)Create a new lock of the specified type (read or write) entering the "competition" for actually getting the lock for the
DistributedLock createLock(boolean isWriteLock, String configSetName)Create a new lock of the specified type (read or write) entering the "competition" for actually getting the lock for the
Upon return from this call, the lock has not been acquired but the it had entered the lock acquiring "competition", and the caller can decide to wait until the lock is granted by calling
Separating the lock creation from lock acquisition allows a more deterministic release of the locks when/if they can't be acquired.
Locks at different paths are independent of each other, multiple
DistributedLockare therefore requested for a single operation and are packaged together and returned as an
CollectionApiLockFactory.createCollectionApiLock(org.apache.solr.common.params.CollectionParams.LockLevel, java.lang.String, java.lang.String, java.lang.String)or
trueif requesting a write lock,
falsefor a read lock.
configSetName- the config set name, can never be
- a lock instance that must be
DistributedLock.release()'ed in a
finally, regardless of the lock having been acquired or not.