FileWatchRegisterKey register(Path filePath, Runnable callback) {
        lock();
        try {
            final FileWatchRegisterKey watchRegisterKey = new FileWatchRegisterKey(filePath);
            final FileSystemWatchContext watchServiceContext = fileSystemWatchServiceMap.computeIfAbsent(
                    filePath.getFileSystem(), fileSystem -> {
                        try {
                            return new FileSystemWatchContext(
                                    "armeria-file-watcher-" + fileSystem.getClass().getName(),
                                    fileSystem.newWatchService());
                        } catch (IOException e) {
                            throw new IllegalArgumentException(
                                    "failed to create a new watch service for the path: " +
                                    watchRegisterKey.filePath(), e);
                        }
                    });
            watchServiceContext.register(watchRegisterKey, callback);
            return watchRegisterKey;
        } finally {
            unlock();
        }
    }
Registers a {@code filePath} and {@code callback} to the {@link WatchService}. When the
contents of the registered file is changed, then the {@code callback} function
is invoked. If the {@code watchEventKey} is already registered, then nothing happens.
This method is thread safe.
@param filePath the path of the file which will be watched for changes.
@param callback the function which is invoked when the file is changed.

@return a key which is used to unregister from watching.
core/src/main/java/com/linecorp/armeria/client/endpoint/FileWatcherRegistry.java