private void uncleanShutdown(boolean beforeJoined) {
    try {
      closeInProgress = true; // set here also to fix bug 36736
      removeAllHealthMonitors();
      shutdownInProgress = true;
      if (distribution != null) {
        distribution.setShutdown();
      }

      askThreadsToStop();

      // wait a moment before asking threads to terminate
      try {
        waitForThreadsToStop(1000);
      } catch (InterruptedException ie) {
        // No need to reset interrupt bit, we're really trying to quit...
      }
      forceThreadsToStop();

    } // try
    finally {
      // ABSOLUTELY ESSENTIAL that we close the distribution channel!
      try {
        // For safety, but channel close in a finally AFTER this...
        if (stats != null) {
          stats.close();
          try {
            Thread.sleep(100);
          } catch (InterruptedException ie) {
            // No need to reset interrupt bit, we're really trying to quit...
          }
        }
      } finally {
        if (distribution != null) {
          logger.info("Now closing distribution for {}",
              localAddress);
          distribution.disconnect(beforeJoined);
        }
      }
    }
  }
Stops the pusher, puller and processor threads and closes the connection to the transport
layer. This should only be used from shutdown() or from the dm initialization code
geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java