Package org.pentaho.di.core.vfs
Class ConcurrentFileSystemManager
- java.lang.Object
-
- org.apache.commons.vfs2.impl.DefaultFileSystemManager
-
- org.apache.commons.vfs2.impl.StandardFileSystemManager
-
- org.pentaho.di.core.vfs.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 ofStandardFileSystemManager
. It locks methods that accessing or mutating the providers Map inDefaultFileSystemManager
.
-
-
Constructor Summary
Constructors Constructor Description ConcurrentFileSystemManager()
-
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
-
-
-
-
Method Detail
-
addProvider
public void addProvider(String[] urlSchemes, org.apache.commons.vfs2.provider.FileProvider provider) throws org.apache.commons.vfs2.FileSystemException
- Overrides:
addProvider
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
- Throws:
org.apache.commons.vfs2.FileSystemException
-
getSchemes
public String[] getSchemes()
- Specified by:
getSchemes
in interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
getSchemes
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
-
hasProvider
public boolean hasProvider(String scheme)
- Specified by:
hasProvider
in interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
hasProvider
in classorg.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 classorg.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 interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
resolveName
in classorg.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 interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
resolveURI
in classorg.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 interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
createFileSystem
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
- Throws:
org.apache.commons.vfs2.FileSystemException
-
_closeFileSystem
public void _closeFileSystem(org.apache.commons.vfs2.FileSystem filesystem)
- Overrides:
_closeFileSystem
in classorg.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 interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
getProviderCapabilities
in classorg.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 interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
getFileSystemConfigBuilder
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
- Throws:
org.apache.commons.vfs2.FileSystemException
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceorg.apache.commons.vfs2.FileSystemManager
- Overrides:
close
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
-
freeUnusedResources
public void freeUnusedResources()
- Overrides:
freeUnusedResources
in classorg.apache.commons.vfs2.impl.DefaultFileSystemManager
-
closeEmbeddedFileSystem
public void closeEmbeddedFileSystem(String embeddedMetastoreKey)
-
-