public static ThreadReference getThreadReference(String locality, Thread thread) {
    ThreadMXBean bean = ManagementFactory.getThreadMXBean();
    ThreadInfo info = bean.getThreadInfo(thread.getId(), Integer.MAX_VALUE);
    return new LocalThread(locality, info);
  }
Get an object suitable for querying the findDependencies method for a given thread.
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/DeadlockDetector.java