org.jboss.aspects.concurrent
Annotation Type SemaphoredMethod


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface SemaphoredMethod

Attach a semaphore to a method. Only a certain amount of threads are allowed to access that method at one time.

Author:
Bill Burke

Required Element Summary
 int permits
          max number of permits
 
Optional Element Summary
 boolean isFair
           
 long timeout
           
 TimeUnit unit
           
 

Element Detail

permits

public abstract int permits
max number of permits

isFair

public abstract boolean isFair
Default:
false

timeout

public abstract long timeout
Default:
-1L

unit

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


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