@Override public void releaseTieLock() { if (holdingTieLock) { distributedLockService.unlock("PERSISTENCE_" + regionPath); holdingTieLock = false; } }
public void unlockSharedConfiguration() { this.sharedConfigLockingService.unlock(SHARED_CONFIG_LOCK_NAME); }
private static void releasePRIDLock(final DistributedLockService lockService) { try { lockService.unlock(PartitionedRegionHelper.MAX_PARTITIONED_REGION_ID); if (logger.isDebugEnabled()) { logger.debug("releasePRIDLock: Released the dlock in allPartitionedRegions for {}", PartitionedRegionHelper.MAX_PARTITIONED_REGION_ID); } } catch (Exception es) { logger.warn(String.format("releasePRIDLock: unlocking %s caught an exception", Integer.valueOf(PartitionedRegionHelper.MAX_PARTITIONED_REGION_ID)), es); } }
void releaseLock(DistributionManager dm) { getLockService(dm).unlock(LOCK_NAME); }
@Override public void cleanup() { try { stats.removeDocumentsSupplier(documentCountSupplier); try { writer.close(); } catch (Exception e) { logger.debug("Unable to clean up index repository", e); } } finally { try { if (lockService != null) { lockService.unlock(lockName); } } catch (LockNotHeldException e) { logger.debug("Tried to unlock file region lock(" + lockName + ") that we did not hold", e); } } }
private void unlock() { try { DistributedLockService dls = getLockService(); dls.unlock(LOCK_NAME); } catch (LockServiceDestroyedException e) { // fix for bug 43574 cache.getCancelCriterion().checkCancelInProgress(e); throw e; } }
/** * Release the distributed lock for the clear operation. */ private void distributedUnlockForClear() { if (!this.scope.isGlobal()) { try { getLockService().unlock("_clearOperation"); } catch (IllegalStateException e) { lockCheckReadiness(); throw e; } } }
@Test public void locksAreReleasedDuringDisconnect() { assertThat(lockService.lock("MyLock", 0, -1)).isTrue(); assertThat(lockService.isHeldByCurrentThread("MyLock")).isTrue(); ((InternalDistributedSystem) system).setIsDisconnectThread(); lockService.unlock("MyLock"); assertThat(lockService.isHeldByCurrentThread("MyLock")).isFalse(); } }
getCache().getGatewaySenderLockService().unlock(META_DATA_REGION_NAME); if (isDebugEnabled) { logger.debug("{}: Unlocked the metadata region", this);
@Override public void unlock() { try { ReplyProcessor21.forceSevereAlertProcessing(); getLockService().unlock(this.key); if (!DistributedRegion.this.entries.containsKey(this.key)) { getLockService().freeResources(this.key); } } catch (IllegalStateException ex) { lockCheckReadiness(); throw ex; } finally { ReplyProcessor21.unforceSevereAlertProcessing(); } }
} finally { if (!success) { lockService.unlock(lockName);