public class VFSDataStore extends CachingDataStore
asyncDownloadCache, asyncTouchCache, backend, inUse, recLenCache, uploadRetryMap
DIGEST
Constructor and Description |
---|
VFSDataStore() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the data store
|
protected Backend |
createBackend() |
protected org.apache.commons.vfs2.FileSystemManager |
createFileSystemManager()
Creates a
FileSystemManager instance. |
protected org.apache.commons.vfs2.FileSystemOptions |
createFileSystemOptions()
Builds and returns
FileSystemOptions instance which is used when resolving the baseFolder
during the initialization. |
int |
getAsyncWritePoolSize()
Returns the pool size of the async write pool executor.
|
org.apache.commons.vfs2.FileSystemManager |
getFileSystemManager()
Returns the VFS
FileSystemManager instance used in this VFS data store. |
String |
getFileSystemManagerClassName()
Returns the class name of the VFS
FileSystemManager instance used in this VFS data store. |
org.apache.commons.vfs2.FileSystemOptions |
getFileSystemOptions()
Returns
FileSystemOptions instance used when resolving the baseFolder . |
protected Properties |
getFileSystemOptionsProperties()
Returns properties used when building a
FileSystemOptions instance by the properties
during the initialization. |
protected String |
getMarkerFile() |
void |
init(String homeDir)
Initialized the data store.
|
void |
setAsyncWritePoolSize(int asyncWritePoolSize)
Sets the pool size of the async write pool executor.
|
void |
setBaseFolderUri(String baseFolderUri)
Sets the base VFS folder URI.
|
void |
setFileSystemManagerClassName(String fileSystemManagerClassName)
Sets the class name of the VFS
FileSystemManager instance used in this VFS data store. |
void |
setFileSystemOptions(org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
Sets the
FileSystemOptions instance used when resolving the baseFolder . |
void |
setFileSystemOptionsProperties(Properties fileSystemOptionsProperties)
Sets the properties used when building a
FileSystemOptions , using DelegatingFileSystemOptionsBuilder . |
void |
setFileSystemOptionsPropertiesInString(String fileSystemOptionsPropertiesInString)
Sets the properties in a semi-colon delimited string used when building a
FileSystemOptions ,
using DelegatingFileSystemOptionsBuilder . |
addRecord, clearInUse, confirmDelete, deleteAllOlderThan, deleteFromCache, deleteRecord, getAllIdentifiers, getAsyncUploadLimit, getBackend, getCachePurgeResizeFactor, getCachePurgeTrigFactor, getCacheSize, getConcurrentUploadsThreads, getConfig, getLastModified, getLength, getMinRecordLength, getOrCreateReferenceKey, getPath, getPendingUploads, getRecord, getRecordIfStored, getUploadRetries, isContinueOnAsyncUploadFailure, isInUse, onAbort, onAbort, onFailure, onFailure, onSuccess, onSuccess, setAsyncUploadLimit, setCachePurgeResizeFactor, setCachePurgeTrigFactor, setCacheSize, setConcurrentUploadsThreads, setConfig, setContinueOnAsyncUploadFailure, setMinRecordLength, setPath, setProactiveCaching, setRecLengthCacheSize, setSecret, setTouchAsync, setUploadRetries, updateModifiedDateOnAccess
encodeHexString, getRecordFromReference, getReferenceFromIdentifier
public void init(String homeDir) throws RepositoryException
CachingDataStore
init
in interface DataStore
init
in class CachingDataStore
homeDir
- the home directory of the repositoryRepositoryException
public void close() throws DataStoreException
DataStore
close
in interface DataStore
close
in class CachingDataStore
DataStoreException
- if a problem occurredprotected Backend createBackend()
createBackend
in class CachingDataStore
protected String getMarkerFile()
getMarkerFile
in class CachingDataStore
public String getFileSystemManagerClassName()
FileSystemManager
instance used in this VFS data store.public void setFileSystemManagerClassName(String fileSystemManagerClassName)
FileSystemManager
instance used in this VFS data store.
If this is not set, then StandardFileSystemManager
is used by default.fileSystemManagerClassName
- public org.apache.commons.vfs2.FileSystemManager getFileSystemManager()
FileSystemManager
instance used in this VFS data store.FileSystemManager
instance used in this VFS data storepublic org.apache.commons.vfs2.FileSystemOptions getFileSystemOptions() throws RepositoryException
FileSystemOptions
instance used when resolving the baseFolder
.
This may return null if FileSystemOptions
instance was not injected or
a fileSystemOptionsProperties
instance cannot be injected or created.
Therefore, the caller should check whether or not this returns null.
When returning null, the caller may not use a FileSystemOptions
instance.FileSystemOptions
instance used when resolving the baseFolder
RepositoryException
public void setFileSystemOptions(org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
FileSystemOptions
instance used when resolving the baseFolder
.fileSystemOptions
- FileSystemOptions
instance used when resolving the baseFolder
public void setFileSystemOptionsProperties(Properties fileSystemOptionsProperties)
FileSystemOptions
, using DelegatingFileSystemOptionsBuilder
.fileSystemOptionsProperties
- properties used when building a FileSystemOptions
public void setFileSystemOptionsPropertiesInString(String fileSystemOptionsPropertiesInString)
FileSystemOptions
,
using DelegatingFileSystemOptionsBuilder
.fileSystemOptionsPropertiesInString
- properties in Stringpublic void setBaseFolderUri(String baseFolderUri)
baseFolderUri
- base VFS folder URIpublic int getAsyncWritePoolSize()
public void setAsyncWritePoolSize(int asyncWritePoolSize)
asyncWritePoolSize
- pool size of the async write pool executorprotected org.apache.commons.vfs2.FileSystemManager createFileSystemManager() throws RepositoryException
FileSystemManager
instance.FileSystemManager
instance.RepositoryException
- if an error occurs creating the manager.protected org.apache.commons.vfs2.FileSystemOptions createFileSystemOptions() throws RepositoryException
FileSystemOptions
instance which is used when resolving the baseFolder
during the initialization.
If fileSystemOptionsProperties
is available, this scans all the property key names starting with FILE_SYSTEM_OPTIONS_PROP_PREFIX
and uses the rest of the key name after the FILE_SYSTEM_OPTIONS_PROP_PREFIX
as the combination of scheme and property name
when building a FileSystemOptions
using DelegatingFileSystemOptionsBuilder
.FileSystemOptions
instance which is used when resolving the baseFolder
during the initializationRepositoryException
- if any file system exception occursprotected Properties getFileSystemOptionsProperties()
FileSystemOptions
instance by the properties
during the initialization.FileSystemOptions
instance by the properties during the initializationCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.