class JGitFileSystemImpl implements JGitFileSystem {

    @Override
    public void close() throws IOException {
        if (isClosed) {
            return;
        }
        git.getRepository().close();
        isClosed = true;
        try {
            fsEventsManager.close(name);
        } catch (final Exception ex) {
            LOGGER.error("Error during close of WatchServices [" + toString() + "]",
                         ex);
        } finally {
            provider.onCloseFileSystem(this);
        }
    }

    public  JGitFileSystemImpl(final JGitFileSystemProvider provider,
                              final Map<String, String> fullHostNames,
                              final Git git,
                              final JGitFileSystemLock lock,
                              final String name,
                              final CredentialsProvider credential,
                              JGitFileSystemsEventsManager fsEventsManager,
                              Map<FileSystemHooks, ?> fsHooks);

}