private long getLockOwnerId(long threadId) {
    /*
     * NOTE: the following getThreadInfo call is much cheaper than the one made
     * in createThreadInfoMap because it does not figure out what locks are being
     * held by the thread and also does not get the call stack.
     * All we need from it is the lockOwnerId.
     */
    final ThreadInfo threadInfo = ManagementFactory.getThreadMXBean().getThreadInfo(threadId, 0);
    if (threadInfo != null) {
      return threadInfo.getLockOwnerId();
    }
    return -1;
  }
@param threadId identifies the thread that may have a lock owner
@return the lock owner thread id or -1 if no lock owner
geode-core/src/main/java/org/apache/geode/internal/monitoring/ThreadsMonitoringProcess.java