private void initializeWatchService() {
        FunctionUtils.doAndHandle(__ -> {
            if (ResourceUtils.isFile(jsonResource)) {
                watcherService = new FileWatcherService(jsonResource.getFile(),
                    file -> {
                        val resources = readFromJsonResource();
                        if (!resources.isEmpty()) {
                            tenantDefinitionList.clear();
                            tenantDefinitionList.addAll(resources);
                        }
                    });
                watcherService.start(getClass().getSimpleName());
            }
        });
    }
This is {@link DefaultTenantsManager}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-multitenancy/src/main/java/org/apereo/cas/multitenancy/DefaultTenantsManager.java