Indicates that a type has barrier semantics.
Formally:
- It is final, or all of its subtypes are guaranteed to have barrier semantics.
- It is at least shallowly immutable.
- It might not have reliable
equals
, hashCode
,
or toString
implementations.
- It has no interaction with input/output whatsoever.
- It uses locks or concurrency mechanisms to guarantee thread safety for some non-barrier object(s).