@Override
  public Set<Dependency<Serializable, Thread>> getHeldResources(Thread[] allThreads) {
    Set<Dependency<Serializable, Thread>> heldResources =
        new HashSet<>();

    for (Thread thread : allThreads) {
      MessageWithReply message = processingMessages.get(thread);
      if (message != null && message.getProcessorId() > 0) {
        heldResources.add(new Dependency<>(
            new MessageKey(message.getSender(), message.getProcessorId()), thread));
      }
    }
    return heldResources;
  }
This class keeps track of the information we need to determine which threads in the receiver
system a reply processor thread is waiting for.

This will allow us to programatically discover deadlocks.
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/MessageDependencyMonitor.java