Lock中声明了四个方法来获取锁 lock()、tryLock()、tryLock(long time, TimeUnit unit)、lockInterruptibly()
lock()
tryLock()
tryLock(long time, TimeUnit unit)
lockInterruptibly()
unlock():解锁
京公网安备 11010502049817号