@Override
    public void destroy() {
        if (heartbeatExecutor != null) {
            heartbeatExecutor.shutdown();
        }
        for (PolarisWatcher watcher : polarisWatchers.values()) {
            watcher.shutdown();
        }
        if (providerAPI != null) {
            providerAPI.destroy();
        }
        if (consumerAPI != null) {
            consumerAPI.destroy();
        }
    }
the main logic of polaris registry, similar to consul

@author <a href=mailto:bner666@gmail.com>ZhangLibin</a>
registry/registry-polaris/src/main/java/com/alipay/sofa/rpc/registry/polaris/PolarisRegistry.java