org.apache.avalon.excalibur.concurrent
インタフェース Sync
- 既知の実装クラスの一覧:
- Semaphore
- public interface Sync
The interface to synchronization objects.
- 導入されたバージョン:
- 4.0
- バージョン:
- CVS $Revision: 1.4 $ $Date: 2001/12/11 09:53:28 $
- 作成者:
- Peter Donald
メソッドの概要 |
void |
acquire()
Aquire access to resource.
|
boolean |
attempt(long msec)
Aquire access to resource.
|
void |
release()
Release lock. |
acquire
public void acquire()
throws java.lang.InterruptedException
- Aquire access to resource.
This method will block until resource aquired.
- 例外:
java.lang.InterruptedException
- if an error occurs
attempt
public boolean attempt(long msec)
throws java.lang.InterruptedException
- Aquire access to resource.
This method will block for a maximum of msec.
- パラメータ:
msec
- the duration to wait for lock to be released- 戻り値:
- true if lock aquired, false on timeout
- 例外:
java.lang.InterruptedException
- if an error occurs
release
public void release()
- Release lock.
"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."