Class AutoCloseableReentrantReadWriteLock
- java.lang.Object
-
- jetbrains.buildServer.serverSide.util.AutoCloseableReentrantReadWriteLock
-
public class AutoCloseableReentrantReadWriteLock extends Object
AutoCloseable wrapper for ReentrantReadWriteLock. Provides readLock() and writeLock() to be used in try-with-resources statement.
-
-
Constructor Summary
Constructors Constructor Description AutoCloseableReentrantReadWriteLock()
Creates a lock with new ReentrantReadWriteLock()AutoCloseableReentrantReadWriteLock(ReadWriteLock lock)
Creates a lock with provided ReadWriteLock
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AL
readLock()
Same as ReadWriteLock.readLock() but provides AutoCloseableAL
writeLock()
Same as ReadWriteLock.readLock() but provides AutoCloseable
-
-
-
Constructor Detail
-
AutoCloseableReentrantReadWriteLock
public AutoCloseableReentrantReadWriteLock()
Creates a lock with new ReentrantReadWriteLock()
-
AutoCloseableReentrantReadWriteLock
public AutoCloseableReentrantReadWriteLock(@NotNull ReadWriteLock lock)
Creates a lock with provided ReadWriteLock- Parameters:
lock
-
-
-