|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=METHOD) @Retention(value=RUNTIME) public @interface SemaphoreLocked
Only a certain amount of threads can access a @Semaphored object. Acquire a permit when entering a method, release it when leaving.
Semaphored
Optional Element Summary | |
---|---|
int |
permits
Num permits to acquire |
long |
timeout
Defaults to -1, block until acquired 0 is just a tryLock |
TimeUnit |
unit
|
public abstract int permits
public abstract long timeout
public abstract TimeUnit unit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |