@Override
    public void init() {
        if (inited.compareAndSet(false, true)) {
            this.scanPeriod = CommonUtils.parseInt(registryConfig.getParameter("registry.domain.scan.period"),
                    scanPeriod);

            Runnable task = () -> {
                try {
                    refreshDomain();
                    notifyListener();
                } catch (Throwable e) {
                    LOGGER.error(e.getMessage(), e);
                }
            };

            scheduledExecutorService = new ScheduledService("DomainRegistry-Back-Load",
                    ScheduledService.MODE_FIXEDDELAY,
                    task, //定时load任务
                    scanPeriod, // 延迟一个周期
                    scanPeriod, // 一个周期循环
                    TimeUnit.MILLISECONDS
            ).start();
        }
    }
@Test
    public void testInit() {
        DomainRegistry domainRegistry = new DomainRegistry(new RegistryConfig());
        assertNull(domainRegistry.scheduledExecutorService);
        domainRegistry.init();
        assertTrue(domainRegistry.scheduledExecutorService.isStarted());
    }