|
lombok-pg - | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||
@Target(value=METHOD) @Retention(value=SOURCE) public @interface Signal
Lock Conditions
void methodAnnotatedWithSignal() {
this.<LOCK_NAME>.lock();
try {
// method body
this.<CONDITION_NAME>.signal();
} finally {
this.<LOCK_NAME>.unlock();
}
}
| Required Element Summary | |
|---|---|
String |
value
Name of the condition. |
| Optional Element Summary | |
|---|---|
String |
lockName
Name of the lock, default is $<CONDITION_NAME>Lock. |
Position |
pos
Specifies the place to put the await-block, default is AFTER. |
| Element Detail |
|---|
public abstract String value
If no condition with the specified name exists a new Condition will
be created, using this name.
public abstract Position pos
AFTER.
Supported positions:
public abstract String lockName
$<CONDITION_NAME>Lock.
If no lock with the specified name exists a new Lock will be created,
using this name.
|
lombok-pg - | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||