Package com.unboundid.util
Class CloseableLock.Lock
java.lang.Object
com.unboundid.util.CloseableLock.Lock
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
CloseableLock
This class provides a
Closeable implementation that may be used to
unlock a CloseableLock 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
-