Class FileSystem
- java.lang.Object
-
- fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
-
- fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageJcloudsAbstract
-
- fr.gouv.vitam.common.storage.filesystem.FileSystem
-
- All Implemented Interfaces:
VitamAutoCloseable,ContentAddressableStorage,java.lang.AutoCloseable
public class FileSystem extends ContentAddressableStorageJcloudsAbstract
FileSystemMock implements a Content Addressable Storage that stores objects on the file system.
-
-
Field Summary
-
Fields inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageJcloudsAbstract
context
-
Fields inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
LISTING_MAX_RESULTS
-
-
Constructor Summary
Constructors Constructor Description FileSystem(StorageConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcloseContext()Close context according to implementation (http client not closed)java.lang.StringcreateReadOrderRequest(java.lang.String containerName, java.util.List<java.lang.String> objectsIds)Create read order (asynchronous read from tape to local FS) for the given objects representing the data at location containerName/objectId.ContainerInformationgetContainerInformation(java.lang.String containerName)Get container information like capacityorg.jclouds.blobstore.BlobStoreContextgetContext(StorageConfiguration configuration)enables the connection to a storage service with the param providedMetadatasObjectgetObjectMetadata(java.lang.String containerName, java.lang.String objectId, boolean noCache)get metadata of the objectvoidremoveReadOrderRequest(java.lang.String readRequestID)Purge all read request id to cleanup local FS-
Methods inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageJcloudsAbstract
createContainer, deleteObject, getObject, getObjectDigest, isExistingContainer, isExistingObject, listContainer, putObject
-
Methods inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
cacheExistsContainer, computeObjectDigest, disableContainerCaching, getConfiguration, isExistingContainerInCache
-
-
-
-
Constructor Detail
-
FileSystem
public FileSystem(StorageConfiguration configuration)
- Parameters:
configuration- to associate with the FileSystem
-
-
Method Detail
-
closeContext
public void closeContext()
Description copied from class:ContentAddressableStorageJcloudsAbstractClose context according to implementation (http client not closed)- Specified by:
closeContextin classContentAddressableStorageJcloudsAbstract
-
createReadOrderRequest
public java.lang.String createReadOrderRequest(java.lang.String containerName, java.util.List<java.lang.String> objectsIds)Description copied from interface:ContentAddressableStorageCreate read order (asynchronous read from tape to local FS) for the given objects representing the data at location containerName/objectId. Return read order entity- Parameters:
containerName- container where this exists.objectsIds- list of the fully qualified name relative to the container.- Returns:
- read order request id
-
removeReadOrderRequest
public void removeReadOrderRequest(java.lang.String readRequestID)
Description copied from interface:ContentAddressableStoragePurge all read request id to cleanup local FS- Parameters:
readRequestID- the read request ID.
-
getContainerInformation
public ContainerInformation getContainerInformation(java.lang.String containerName) throws ContentAddressableStorageNotFoundException
Description copied from interface:ContentAddressableStorageGet container information like capacity- Specified by:
getContainerInformationin interfaceContentAddressableStorage- Specified by:
getContainerInformationin classContentAddressableStorageJcloudsAbstract- Parameters:
containerName- the container name- Returns:
- container information like usableSpace
- Throws:
ContentAddressableStorageNotFoundException- Thrown when the container cannot be located.
-
getContext
public org.jclouds.blobstore.BlobStoreContext getContext(StorageConfiguration configuration)
Description copied from class:ContentAddressableStorageJcloudsAbstractenables the connection to a storage service with the param provided- Specified by:
getContextin classContentAddressableStorageJcloudsAbstract- Parameters:
configuration- the storage configuration- Returns:
- BlobStoreContext
-
getObjectMetadata
public MetadatasObject getObjectMetadata(java.lang.String containerName, java.lang.String objectId, boolean noCache) throws ContentAddressableStorageException
Description copied from interface:ContentAddressableStorageget metadata of the object- Parameters:
containerName- the container nameobjectId- the objectId to check- Returns:
- MetadatasObjectResult
- Throws:
ContentAddressableStorageException- Thrown when get action failed due some other failure
-
close
public void close()
-
-