This page outlines the distributed lock manager.

Interactions with the distributed lock manager

Typical pseudocode for interactions with the lock manager are

try {
   acquire lock foo

   ...

   acquire lock bar
   ...

}
finally {
   release all locks
}

Example

Adding an item to a partitioned cache

try {
   LockManager lockManager = ...;
   ResourceController controller = ...;

   lockManager.acquire(resourceID);

   controller.put(key, value);
}
finally {
   lockManager.releaseAllLocks()
}