Java Semaphore
java.util.concurrent.Semaphore
A counting semaphore. The methods acquire() and release() are used here instead of P() and V(). Each acquire() blocks if necessary until a permit is available, and then takes it. Each release() adds a permit, potentially releasing a blocking acquirer. [1]
Need More Help?
Bibliography
1. Java API