|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.concurrencyModel.CriticalArea
public final class CriticalArea
Care class. Each area is identified through a name. If any other thread tries to access the same area, it has to wait until no other thread is in this area.
| Constructor Summary | |
|---|---|
CriticalArea(String name)
Creates an instance of the CriticalArea class. |
|
| Method Summary | |
|---|---|
boolean |
enter()
Enters the critical area. |
void |
exit()
Leaves the critical area. |
String |
getName()
Gets a name of the critical area. |
boolean |
tryEnter(long time,
TimeUnit unit)
Enters the critical area if it is free within the given waiting time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CriticalArea(String name)
name - name for the critical area.| Method Detail |
|---|
public String getName()
public boolean enter()
public boolean tryEnter(long time,
TimeUnit unit)
time - the maximum time to waitunit - the time unit of the time argument
public void exit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||