Class Semaphore
- java.lang.Object
-
- com.sonyericsson.jenkins.plugins.bfa.db.Semaphore
-
public class Semaphore extends Object
"Real" binary semaphore, where subsequent calls to release do not make the semaphore be able to acquire more than the maximum permits.- Author:
- Tomas Westling <tomas.westling@sonyericsson.com>
-
-
Constructor Summary
Constructors Constructor Description Semaphore()
Standard constructor.
-
-
-
Method Detail
-
acquire
public void acquire() throws InterruptedException
- Throws:
InterruptedException
- if the java.util.concurrent.Semaphore is interrupted.- See Also:
The difference is that this tries to acquire all available permits if there are any and 1 if there are none.
-
release
public void release()
-
-