Class ConcurrentFileSystemManager

  • All Implemented Interfaces:
    AutoCloseable, org.apache.commons.vfs2.FileSystemManager

    public class ConcurrentFileSystemManager
    extends org.apache.commons.vfs2.impl.StandardFileSystemManager
    This class is aimed to be a thread-safe version of StandardFileSystemManager. It locks methods that accessing or mutating the providers Map in DefaultFileSystemManager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void _closeFileSystem​(org.apache.commons.vfs2.FileSystem filesystem)  
      void addProvider​(String[] urlSchemes, org.apache.commons.vfs2.provider.FileProvider provider)  
      void close()  
      void closeEmbeddedFileSystem​(String embeddedMetastoreKey)  
      org.apache.commons.vfs2.FileObject createFileSystem​(String scheme, org.apache.commons.vfs2.FileObject file)  
      void freeUnusedResources()  
      org.apache.commons.vfs2.FileSystemConfigBuilder getFileSystemConfigBuilder​(String scheme)  
      Collection<org.apache.commons.vfs2.Capability> getProviderCapabilities​(String scheme)  
      String[] getSchemes()  
      boolean hasProvider​(String scheme)  
      org.apache.commons.vfs2.FileObject resolveFile​(org.apache.commons.vfs2.FileObject baseFile, String uri, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)  
      org.apache.commons.vfs2.FileName resolveName​(org.apache.commons.vfs2.FileName base, String name, org.apache.commons.vfs2.NameScope scope)  
      org.apache.commons.vfs2.FileName resolveURI​(String uri)  
      • Methods inherited from class org.apache.commons.vfs2.impl.StandardFileSystemManager

        configurePlugins, createDefaultFileReplicator, init, setClassLoader, setConfiguration, setConfiguration
      • Methods inherited from class org.apache.commons.vfs2.impl.DefaultFileSystemManager

        addExtensionMap, addMimeTypeMap, addOperationProvider, addOperationProvider, addProvider, addVirtualFileSystemScheme, canCreateFileSystem, closeFileSystem, createFileSystem, createVirtualFileSystem, createVirtualFileSystem, getBaseFile, getCacheStrategy, getFileContentInfoFactory, getFileObjectDecorator, getFileObjectDecoratorConst, getFilesCache, getLogger, getOperationProviders, getReplicator, getTemporaryFileStore, getURLStreamHandlerFactory, resolveFile, resolveFile, resolveFile, resolveFile, resolveFile, resolveFile, resolveName, setBaseFile, setBaseFile, setCacheStrategy, setDefaultProvider, setFileContentInfoFactory, setFileObjectDecorator, setFilesCache, setLogger, setReplicator, setTemporaryFileStore, toFileObject
    • Constructor Detail

      • ConcurrentFileSystemManager

        public ConcurrentFileSystemManager()
    • Method Detail

      • addProvider

        public void addProvider​(String[] urlSchemes,
                                org.apache.commons.vfs2.provider.FileProvider provider)
                         throws org.apache.commons.vfs2.FileSystemException
        Overrides:
        addProvider in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getSchemes

        public String[] getSchemes()
        Specified by:
        getSchemes in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        getSchemes in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
      • hasProvider

        public boolean hasProvider​(String scheme)
        Specified by:
        hasProvider in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        hasProvider in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
      • resolveFile

        public org.apache.commons.vfs2.FileObject resolveFile​(org.apache.commons.vfs2.FileObject baseFile,
                                                              String uri,
                                                              org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
                                                       throws org.apache.commons.vfs2.FileSystemException
        Overrides:
        resolveFile in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • resolveName

        public org.apache.commons.vfs2.FileName resolveName​(org.apache.commons.vfs2.FileName base,
                                                            String name,
                                                            org.apache.commons.vfs2.NameScope scope)
                                                     throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        resolveName in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        resolveName in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • resolveURI

        public org.apache.commons.vfs2.FileName resolveURI​(String uri)
                                                    throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        resolveURI in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        resolveURI in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • createFileSystem

        public org.apache.commons.vfs2.FileObject createFileSystem​(String scheme,
                                                                   org.apache.commons.vfs2.FileObject file)
                                                            throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        createFileSystem in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        createFileSystem in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • _closeFileSystem

        public void _closeFileSystem​(org.apache.commons.vfs2.FileSystem filesystem)
        Overrides:
        _closeFileSystem in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
      • getProviderCapabilities

        public Collection<org.apache.commons.vfs2.Capability> getProviderCapabilities​(String scheme)
                                                                               throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getProviderCapabilities in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        getProviderCapabilities in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • getFileSystemConfigBuilder

        public org.apache.commons.vfs2.FileSystemConfigBuilder getFileSystemConfigBuilder​(String scheme)
                                                                                   throws org.apache.commons.vfs2.FileSystemException
        Specified by:
        getFileSystemConfigBuilder in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        getFileSystemConfigBuilder in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
        Throws:
        org.apache.commons.vfs2.FileSystemException
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.apache.commons.vfs2.FileSystemManager
        Overrides:
        close in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
      • freeUnusedResources

        public void freeUnusedResources()
        Overrides:
        freeUnusedResources in class org.apache.commons.vfs2.impl.DefaultFileSystemManager
      • closeEmbeddedFileSystem

        public void closeEmbeddedFileSystem​(String embeddedMetastoreKey)