Is there a relationship when using a Lock object? Observation as in the case of a synchronized block for all platforms?
Yes it is.
There are several actions that create: in front of a relationship, and one of them is synchronization ( here ), and the Java lock object is also designed for this purpose.
Read about Java Memory Alignment Properties from Oracle Docs. Except below to be highlighted in the link.
The “Extending these safeguards” section below refers to memory consistency properties, such as the “occur before” relationship. Lock class belongs to the java.util.concurrent , so it guarantees memory consistency properties, such as the "happen sooner" relationship, etc.
The methods of all classes in java.util.concurrent and its subpackages extend these guarantees for higher-level synchronization.
source share