|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--org.apache.avalon.excalibur.concurrent.ConditionalEvent
This class implements a POSIX style "Event" object. The difference between the ConditionalEvent and the java wait()/notify() technique is in handling of event state. If a ConditionalEvent is signalled, a thread that subsequently waits on it is immediately released. In case of auto reset EventObjects, the object resets (unsignalled) itself as soon as it is signalled and waiting thread(s) are released (based on whether signal() or signalAll() was called).
コンストラクタの概要 | |
ConditionalEvent(boolean initialState)
Creates a manual reset ConditionalEvent with a specified initial state |
|
ConditionalEvent(boolean initialState,
boolean autoReset)
Creates a ConditionalEvent with the defined initial state |
メソッドの概要 | |
boolean |
isSignalled()
Checks if the event is signalled. |
void |
reset()
Resets the event to an unsignalled state |
void |
signal()
Signals the event. |
void |
signalAll()
Current implementation only works with manual reset events. |
void |
waitForSignal()
If the event is signalled, this method returns immediately resetting the signal, otherwise it blocks until the event is signalled. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public ConditionalEvent(boolean initialState)
pInitialState
- Sets the initial state of the ConditionalEvent.
Signalled if pInitialState is true, unsignalled otherwise.public ConditionalEvent(boolean initialState, boolean autoReset)
pInitialState
- if true, the ConditionalEvent is signalled when
created.pAutoReset
- if true creates an auto-reset ConditionalEventメソッドの詳細 |
public boolean isSignalled()
public void signal()
signalAll()
,
waitForSignal()
public void signalAll()
waitForSignal()
public void reset()
public void waitForSignal() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the thread is interrupted when blocked
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |