Package com.unboundid.util
Class CloseableReadWriteLock.ReadLock
java.lang.Object
com.unboundid.util.CloseableReadWriteLock.ReadLock
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
CloseableReadWriteLock
This class provides a
Closeable implementation that may be used to
unlock a CloseableReadWriteLock's read lock via Java's
try-with-resources facility.-
Method Summary
Modifier and TypeMethodDescriptionvoidThis method does nothing.voidclose()Unlocks the associated lock.
-
Method Details
-
avoidCompilerWarning
This method does nothing. However, calling it inside a try block when used in the try-with-resources framework can help avoid a compiler warning that the JVM will give you if you don't reference theCloseableobject inside the try block. -
close
Unlocks the associated lock.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-