public boolean hasPersistentLock(String svcId,String lockId) throws Exception {
  try {
    DistributedPersistentLock lock=_coordinator.getSiteLocalPersistentLock(lockId);
    if (lock != null) {
      String lockOwner=lock.getLockOwner();
      if (lockOwner != null && lockOwner.equals(svcId)) {
        _log.info("Current owner of the {} lock: {} ",lockId,lockOwner);
        return true;
      }
    }
  }
 catch (  Exception e) {
    _log.error("Can not get {} lock owner ",lockId);
  }
  return false;
}

public boolean hasPersistentLock ( String svcId , String lockId ) throws Exception { try { DistributedPersistentLock lock = _coordinator . getSiteLocalPersistentLock ( lockId ) ; if ( lock != null ) { String lockOwner = lock . getLockOwner ( ) ; if ( lockOwner != null && lockOwner . equals ( svcId ) ) { _log . info ( "Current owner of the {} lock: {} " , lockId , lockOwner ) ; return true ; } } } catch ( Exception e ) { _log . error ( "Can not get {} lock owner " , lockId ) ; } return false ; }
the method to check if the given node holds the persistent upgrade lock
