|
Lombok - v0.10.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value=METHOD) @Retention(value=SOURCE) public @interface Synchronized
Almost exactly like putting the 'synchronized' keyword on a method, except will synchronize on a private internal Object, so that other code not under your control doesn't meddle with your thread management by locking on your own instance.
For non-static methods, a field named $lock is used, and for static methods,
$LOCK is used. These will be generated if needed and if they aren't already present. The contents
of the fields will be serializable.
| Optional Element Summary | |
|---|---|
String |
value
Optional: specify the name of a different field to lock on. |
public abstract String value
|
Lombok - v0.10.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||