fr.gouv.culture.util.apache.avalon.excalibur.concurrent
Class Semaphore

java.lang.Object
  extended by fr.gouv.culture.util.apache.avalon.excalibur.concurrent.Semaphore
All Implemented Interfaces:
EDU.oswego.cs.dl.util.concurrent.Sync
Direct Known Subclasses:
Mutex

public class Semaphore
extends java.lang.Object
implements EDU.oswego.cs.dl.util.concurrent.Sync

Since:
4.0
Version:
CVS $Revision: 1.5 $ $Date: 2010/05/24 07:56:40 $

Field Summary
 
Fields inherited from interface EDU.oswego.cs.dl.util.concurrent.Sync
ONE_CENTURY, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR
 
Constructor Summary
Semaphore(long tokens)
           
 
Method Summary
 void acquire()
           
 boolean attempt(long msecs)
           
 long getTokens()
           
 void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Semaphore

public Semaphore(long tokens)
Method Detail

acquire

public void acquire()
             throws java.lang.InterruptedException
Specified by:
acquire in interface EDU.oswego.cs.dl.util.concurrent.Sync
Throws:
java.lang.InterruptedException

release

public void release()
Specified by:
release in interface EDU.oswego.cs.dl.util.concurrent.Sync

attempt

public boolean attempt(long msecs)
                throws java.lang.InterruptedException
Specified by:
attempt in interface EDU.oswego.cs.dl.util.concurrent.Sync
Throws:
java.lang.InterruptedException

getTokens

public long getTokens()


Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.