code: private void clearDeployments(final Handler<AsyncResult<Void>> doneHandler) {
      context.execute(new Action<Void>() {
        @Override
        public Void perform() {
          Collection<String> sdeploymentsInfo = deployments.get(group);
          for (String sdeploymentInfo : sdeploymentsInfo) {
            JsonObject deploymentInfo = new JsonObject(sdeploymentInfo);
            if (deploymentInfo.getString("address").equals(internal)) {
              deployments.remove(group, sdeploymentInfo);
            }
          }
          return null;
        }
      }, doneHandler);
    }
docs: When the cluster is shutdown properly we need to remove deployments
  from the deployments map in order to ensure that deployments aren't
  redeployed if this node leaves the cluster.