| Returns an existing
Lock on the specified key or creates a new one if none was found. This
operation should be thread safe. Successive calls with the same key may or may not return
the same
Lock . However, different threads asking for the same Lock at the same time will
get the same Lock object.
Parameters: key - the object that defines the visibility or scope of the lock. an existing lock on the specified key or creates a new one if none was found. |