org.jboss.aspects.concurrent
Annotation Type SemaphoreLocked


@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.

Author:
Bill Burke
See Also:
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
           
 

permits

public abstract int permits
Num permits to acquire

Default:
1

timeout

public abstract long timeout
Defaults to -1, block until acquired 0 is just a tryLock

Default:
-1L

unit

public abstract TimeUnit unit
Default:
java.util.concurrent.TimeUnit.MILLISECONDS


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.