public interface Lockable
Lock lock(boolean blocking) throws java.lang.IllegalStateException
Lock
object is obtained and
the lock holds until the Lock.unlock()
method is called.
Otherwise, this method blocks until the lock can be acquired or
null is returned if a non-blocking call was required.blocking
- if true, this method will block until the lock is obtainedjava.lang.IllegalStateException
- if the lock cannot be obtained