Package org.firebirdsql.gds.ng
Interface LockCloseable
- 
- All Superinterfaces:
- java.lang.AutoCloseable
 - Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
 @FunctionalInterface public interface LockCloseable extends java.lang.AutoCloseableUnlocks the lock onclose(), intended for use with try-with-resources.Implementations do not guard against multiple invocations of close(). That means, each call toclosewill result in anLock.unlock()or equivalent.- Since:
- 5
- Author:
- Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description static LockCloseableNO_OPLock closeable that can be used as a no-op (e.g.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Performs anLock.unlock()or equivalent on the lock.
 
- 
- 
- 
Field Detail- 
NO_OPstatic final LockCloseable NO_OP Lock closeable that can be used as a no-op (e.g. if there is no lock, and thus nothing to unlock).
 
- 
 
-