public class ComputeUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
Constructor and Description |
---|
ComputeUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
acquire(java.util.concurrent.Semaphore sem)
Acquires a permit from this semaphore
|
static void |
acquire(java.util.concurrent.Semaphore sem,
int count)
Acquires the given number of permits from
this semaphore
|
static void |
joinThread(java.lang.Thread thread)
Join the thread
|
public static void acquire(java.util.concurrent.Semaphore sem, int count)
sem
- the Semaphorecount
- the number of permits to acquirepublic static void acquire(java.util.concurrent.Semaphore sem)
sem
- the Semaphorepublic static void joinThread(java.lang.Thread thread)
thread
- the thread to be joined