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
           
 java.util.concurrent.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 java.util.concurrent.TimeUnit unit
Default:
MILLISECONDS


Copyright © 2004 JBoss Inc. All Rights Reserved.