Annotation Type 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 notsynchronized
, it contains nosynchronized
blocks, it contains no calls tolock
orunlock
, 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:
MayReleaseLocks
,ReleasesNoLocks
,SideEffectFree
,Pure
- See the Checker Framework Manual:
- Lock Checker, Example use of @LockingFree