@Override protected boolean isCurrentlyLockGrantor() { return this.scope.isGlobal() && getLockService().isLockGrantor(); }
@Override public void becomeLockGrantor() { checkReadiness(); checkForLimitedOrNoAccess(); if (!this.scope.isGlobal()) { throw new IllegalStateException( String.format( "Distribution locks are only supported for regions with GLOBAL scope, not %s", this.scope)); } DistributedLockService svc = getLockService(); try { super.becomeLockGrantor(); if (!svc.isLockGrantor()) { svc.becomeLockGrantor(); } } finally { if (!svc.isLockGrantor()) { if (logger.isDebugEnabled()) { logger.debug("isLockGrantor is false after becomeLockGrantor for {}", getFullPath()); } } } }