Class AL
- java.lang.Object
-
- jetbrains.buildServer.serverSide.util.AL
-
- All Implemented Interfaces:
AutoCloseable
public final class AL extends Object implements AutoCloseable
AutoCloseable wrapper for a lock. Locks on construction, provides AutoCloseable.close() for unlock in try-with-resources statement. Could be used through AutoCloseableReentrantReadWriteLock.
-
-
Constructor Detail
-
AL
public AL(@NotNull Lock lock)
Wraps the lock and locks it- Parameters:
lock
- lock to use
-
-
Method Detail
-
close
public void close()
Unlocks the lock. Should be used by try-with-resources statement.- Specified by:
close
in interfaceAutoCloseable
-
-