public DependencyGraph find() {

    final DeadlockDetector detector = new DeadlockDetector();
    ResultCollector<HashSet<Dependency>, Serializable> collector =
        new ResultCollector<HashSet<Dependency>, Serializable>() {

          @Override
          public synchronized Serializable getResult() throws FunctionException {
            return null;
          }

          @Override
          public synchronized Serializable getResult(long timeout, TimeUnit unit)
              throws FunctionException, InterruptedException {
            return null;
          }

          @Override
          public synchronized void addResult(DistributedMember memberID,
              HashSet<Dependency> resultOfSingleExecution) {
            detector.addDependencies(resultOfSingleExecution);

          }

          @Override
          public void endResults() {

        }

          @Override
          public void clearResults() {

        }


        };

    Execution execution;
    if (targetMembers != null) {
      execution = FunctionService.onMembers(targetMembers).withCollector(collector);
    } else {
      execution = FunctionService.onMembers().withCollector(collector);
    }

    ((AbstractExecution) execution).setIgnoreDepartedMembers(true);
    collector = execution.execute(new CollectDependencyFunction());

    // Wait for results
    collector.getResult();

    return detector.getDependencyGraph();
  }
Find any deadlocks the exist in this distributed system.

The deadlocks are returned as a list of dependencies. See {@link DeadlockDetector}
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/GemFireDeadlockDetector.java