public void acquire () throws InterruptedException

Acquires a permit from this semaphore, blocking until one is available, or the thread is interrupted.

Acquires a permit, if one is available and returns immediately, reducing the number of available permits by one.

If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens:

If the current thread:

then InterruptedException is thrown and the current thread's interrupted status is cleared.

Exceptions:
InterruptedException    if the current thread is interrupted