public class Semaphore extends Object implements Sync
| Constructor and Description |
|---|
Semaphore(int allowed) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire()
Acquires this sync
|
int |
getUsers() |
protected void |
logAcquire() |
protected void |
logDeadlock() |
protected void |
logRelease() |
void |
release()
Releases this sync
|
String |
toString() |
protected boolean |
waitImpl(Object lock) |
public int getUsers()
public void acquire()
throws InterruptedException
Syncacquire in interface SyncInterruptedExceptionSync.release()public void release()
Syncrelease in interface SyncSync.acquire()protected boolean waitImpl(Object lock) throws InterruptedException
InterruptedExceptionprotected void logAcquire()
protected void logDeadlock()
protected void logRelease()
Copyright © 2015 JBoss by Red Hat. All rights reserved.