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
Sync
acquire
in interface Sync
InterruptedException
Sync.release()
public void release()
Sync
release
in interface Sync
Sync.acquire()
protected boolean waitImpl(Object lock) throws InterruptedException
InterruptedException
protected void logAcquire()
protected void logDeadlock()
protected void logRelease()
Copyright © 2018 JBoss by Red Hat. All rights reserved.