private synchronized void scheduleUpdateIfRequired() {

        // When a file is changed the filesystem can trigger two changes, one to change the file content
        // and another to change the file access time. To prevent a duplicate read we delay the read
        // a bit so we can have many changes during that delay period but with only one read of the file.
        if (isFileReadScheduled.compareAndSet(false, true)) {
            LOGGER.info("Scheduling call to change listener for file {} in {}ms",
                    monitoredFile.toAbsolutePath().normalize(),
                    DELAY_BEFORE_FILE_READ_MS);
            CompletableFuture.delayedExecutor(DELAY_BEFORE_FILE_READ_MS, TimeUnit.MILLISECONDS)
                    .execute(() -> {
                        try {
                            synchronized (this) {
                                onFileChange();
                            }
                        } finally {
                            isFileReadScheduled.set(false);
                        }
                    });
        }
    }
Starts the object. Called <i>before</i> the application becomes available.
stroom-util/src/main/java/stroom/util/config/AbstractFileChangeMonitor.java