|
lombok-pg - | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||
@Target(value=METHOD) @Retention(value=SOURCE) public @interface AwaitBeforeAndSignalAfter
Lock Conditions
void methodAnnotatedWithAwait() throws java.lang.InterruptedException {
this.<LOCK_NAME>.lock();
try {
while (this.<AWAIT_CONDITION_METHOD>()) {
this.<AWAIT_CONDITION_NAME>.await();
}
// method body
this.<SIGNAL_CONDITION_NAME>.signal();
} finally {
this.<LOCK_NAME>.unlock();
}
}
| Required Element Summary | |
|---|---|
String |
awaitConditionMethod
Method to verify if the await-condition is met. |
String |
awaitConditionName
Name of the await-condition. |
String |
signalConditionName
Name of the signal-condition. |
| Optional Element Summary | |
|---|---|
String |
lockName
Name of the lock, default is $<AWAIT_CONDITION_NAME><SIGNAL_CONDITION_NAME>Lock. |
| Element Detail |
|---|
public abstract String signalConditionName
If no condition with the specified name exists a new Condition will
be created, using this name.
public abstract String awaitConditionName
If no condition with the specified name exists a new Condition will
be created, using this name.
public abstract String awaitConditionMethod
The method must return a boolean and may not require any parameters.
public abstract String lockName
$<AWAIT_CONDITION_NAME><SIGNAL_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 | |||||||