In the above pseudo code, the lock is implemented by the call ???sharedLock.executeLocked.??? In one embodiment, this snippet of code is an object that only one thread may obtain and execute on as the ???sharedLock??? is object acquired from the shared domain (for example, cache).