|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
public @interface Synchronized
Instead of synchronized methods you can mark these methods as
"@Synchronized". The SynchronizedAspect in patterntesting.concurrent
will use ReentrantLock to realize it and to avoid deadlocks.
If you set the log level to TRACE you can get additional information
about the locks and waiting threads.
The default value for the timeout is 1800 seconds (30 minutes). If you
want a shorter value you can use the timeout and unit attributes.
Example:
@Synchronized(timeout=10, unit=TimeUnit.SECONDS)
will set the timeout to 10 seconds.
TimeUnit| Optional Element Summary | |
|---|---|
long |
timeout
The default timeout is 30 minutes (1800 seconds). |
TimeUnit |
unit
The unit of time (with TimeUnit.SECONDS as default). |
public abstract long timeout
public abstract TimeUnit unit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||