This page outlines the distributed lock manager.
Interactions with the distributed lock manager
Typical pseudocode for interactions with the lock manager are
| Code Block |
|---|
try {
acquire lock foo
...
acquire lock bar
...
}
finally {
release all locks
}
|
Example
Adding an item to a partitioned cache
| Code Block |
|---|
try {
LockManager lockManager = ...;
ResourceController controller = ...;
lockManager.acquire(resourceID);
controller.put(key, value);
}
finally {
lockManager.releaseAllLocks()
}
|
