|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.core.concurrent.BarrierSignaler
public final class BarrierSignaler
The Signaler interface was designed to get around the problem of not being able to extend the functionality of the Object.notify and Object.notifyAll methods. In some instances is would be nice to alter the default behavior slightly, the signaler interface allows this to occur.
An object that implements the Signaler interface is used just like a typical object. But instead of using notify and notifyAll, the methods signal and signalAll should be used in their place.
| Constructor Summary | |
|---|---|
BarrierSignaler(int barrier)
Constructs a new barrier signaler. |
|
| Method Summary | |
|---|---|
void |
signal()
Provides the functionality of the notify method, but may be overridden by the implementor to provide additional functionality. |
void |
signalAll()
Provides the functionality of the notifyAll method, but may be overridden by the implementor to provide additional functionality. |
void |
waitFor()
waitFor |
void |
waitFor(long timeout)
waitFor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BarrierSignaler(int barrier)
barrier - The barrier for notification to start.| Method Detail |
|---|
public void signal()
Provides the functionality of the notify method, but may be overridden by the implementor to provide additional functionality.
signal in interface SignalerObject.notify()public void signalAll()
Provides the functionality of the notifyAll method, but may be overridden by the implementor to provide additional functionality.
signalAll in interface SignalerObject.notifyAll()
public void waitFor()
throws InterruptedException
waitFor
InterruptedException - if any.
public void waitFor(long timeout)
throws InterruptedException
waitFor
timeout - a long.
InterruptedException - if any.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||