Author: dereed
Date: 2012-07-24 21:23:03 -0400 (Tue, 24 Jul 2012)
New Revision: 8520
Modified:
core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java
Log:
[JBCACHE-1609] Don't lock the entire parent's subtree when inactivating a region
Modified: core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java 2012-07-25
01:19:25 UTC (rev 8519)
+++ core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java 2012-07-25
01:23:03 UTC (rev 8520)
@@ -100,7 +100,7 @@
// Lock the parent, as we're about to write to it
parent = subtreeRoot.getParentDirect();
if (parent != null)
- parentLocked = lockManager.lockAll(parent, WRITE, getOwnerForLock(),
stateFetchTimeout);
+ parentLocked = lockManager.lock(parent, WRITE, getOwnerForLock(),
stateFetchTimeout);
// Remove the subtree
cache.evict(subtree, true);
@@ -109,7 +109,7 @@
if (parent != null)
{
log.debug("forcing release of locks in parent");
- lockManager.unlockAll(parent, getOwnerForLock());
+ lockManager.unlock(parent, getOwnerForLock());
}
parentLocked = false;
@@ -137,7 +137,7 @@
log.debug("forcing release of locks in parent");
try
{
- if (parent != null) lockManager.unlockAll(parent, getOwnerForLock());
+ if (parent != null) lockManager.unlock(parent, getOwnerForLock());
}
catch (Throwable t)
{
Show replies by date