Package org.lsst.ccs
Class ConfigurationService.ConfigurationWriteLock
java.lang.Object
org.lsst.ccs.ConfigurationService.ConfigurationWriteLock
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- ConfigurationService
Encapsulates a writer lock on the subsystem configuration. An active reader
lock will prevent the granting of writer locks but will allow more
reader locks to be granted. When a writer lock is active then no reader
locks or further non-recursive write locks will be granted until the writer lock is
released. A writer lock will not be granted until all reader locks are released.
Where possible call the constructor using a try-with-resources statement
so that the lock will be released automatically when that statement is
exited. Otherwise an explicit call
to close() will be required to release the lock.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
writeLock
-
-
Method Details
-
close
public void close()Releases the configuration lock;- Specified by:
closein interfaceAutoCloseable
-