/** * Releases the primary lock for this bucket. */ protected void releasePrimaryLock() { // We don't have a lock if we have a parent advisor if (parentAdvisor != null) { return; } assignStartingBucketAdvisorIfFixedPartitioned(); if (startingBucketAdvisor != null) { return; } try { DistributedMemberLock thePrimaryLock = getPrimaryLock(false); if (thePrimaryLock != null) { thePrimaryLock.unlock(); } } catch (LockNotHeldException e) { Assert.assertTrue(!isHosting(), "Got LockNotHeldException for Bucket = " + this); } catch (LockServiceDestroyedException e) { Assert.assertTrue(isClosed(), "BucketAdvisor was not closed before destroying PR lock service"); } }
thePrimaryLock = getPrimaryLock(true); if (thePrimaryLock == null) {