Attempts to acquire this lock. If the lock is in use and the specified delay is greater than zero, the calling thread will block until one of the following happens:
- This lock is available
- The thread is interrupted
- The specified delay has elapsed
While a thread is waiting, locks it already owns may be granted to other threads if necessary to break a deadlock. In this situation, the calling thread may be blocked for longer than the specified delay. On returning from this call, the calling thread will once again have exclusive access to any other locks it owned upon entering the acquire method.
@param delay the number of milliseconds to delay
@return true
if the lock was successfully acquired, and false
otherwise.
@exception InterruptedException if the thread was interrupted