public void watchStore(final Resource resource) throws Exception {
        if (ResourceUtils.isFile(resource)) {
            this.storeWatcherService = new FileWatcherService(resource.getFile(),
                file -> importStore(new FileSystemResource(file)));
            this.storeWatcherService.start(getClass().getSimpleName());
        }
    }
Watch store.

@param resource the resource
@throws Exception the exception
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/DefaultAttributeDefinitionStore.java