org.apache.avalon.excalibur.concurrent
クラス Semaphore

java.lang.Object
  |
  +--org.apache.avalon.excalibur.concurrent.Semaphore
すべての実装インタフェース:
Sync
直系の既知のサブクラス:
Mutex

public class Semaphore
extends java.lang.Object
implements Sync

導入されたバージョン:
4.0
バージョン:
CVS $Revision: 1.4 $ $Date: 2001/12/11 09:53:28 $

コンストラクタの概要
Semaphore(long tokens)
           
 
メソッドの概要
 void acquire()
          Aquire access to resource.
 boolean attempt(long msecs)
          Aquire access to resource.
 void release()
          Release lock.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Semaphore

public Semaphore(long tokens)
メソッドの詳細

acquire

public void acquire()
             throws java.lang.InterruptedException
インタフェース Sync の記述:
Aquire access to resource. This method will block until resource aquired.
定義:
インタフェース Sync 内の acquire
インタフェース org.apache.avalon.excalibur.concurrent.Sync からコピーされたタグ:
例外:
java.lang.InterruptedException - if an error occurs

release

public void release()
インタフェース Sync の記述:
Release lock.
定義:
インタフェース Sync 内の release

attempt

public boolean attempt(long msecs)
                throws java.lang.InterruptedException
インタフェース Sync の記述:
Aquire access to resource. This method will block for a maximum of msec.
定義:
インタフェース Sync 内の attempt
インタフェース org.apache.avalon.excalibur.concurrent.Sync からコピーされたタグ:
パラメータ:
msec - the duration to wait for lock to be released
戻り値:
true if lock aquired, false on timeout
例外:
java.lang.InterruptedException - if an error occurs


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."