Annotation Interface LockingFree
@Documented
@Retention(RUNTIME)
@Target({METHOD,CONSTRUCTOR})
@InheritedAnnotation
public @interface LockingFree
The method neither acquires nor releases locks, nor do any of the methods that it calls. More
specifically, the method is not
synchronized
, it contains no synchronized
blocks,
it contains no calls to lock
or unlock
, and it contains no calls to other
non-@LockingFree
methods.
@LockingFree
provides a stronger guarantee than @
ReleasesNoLocks
and a
weaker guarantee than @
SideEffectFree
.
- See Also:
- See the Checker Framework Manual:
- Lock Checker, Example use of @LockingFree