Class OpenstackSwift
- java.lang.Object
-
- fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
-
- fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageJcloudsAbstract
-
- fr.gouv.vitam.cas.container.swift.OpenstackSwift
-
- All Implemented Interfaces:
VitamAutoCloseable
,ContentAddressableStorage
,java.lang.AutoCloseable
public class OpenstackSwift extends ContentAddressableStorageJcloudsAbstract
CreatesBlobStoreContext
configured onStorageConfiguration
storage.conf file . This can be used to make an information about container.- See Also:
SwiftApi
,BlobStoreContext
, https://github.com/jclouds/jclouds/pull/1046
Managing the header name in the TempAuth (Identity Protocol v1)
-
-
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 OpenstackSwift(StorageConfiguration configuration)
OpenstackSwift(StorageConfiguration configuration, org.jclouds.openstack.swift.v1.SwiftApi swiftApi, org.jclouds.openstack.swift.v1.features.ContainerApi containerApi, org.jclouds.openstack.swift.v1.features.AccountApi accountApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
closeContext()
Close context according to implementation (http client not closed)void
createContainer(java.lang.String containerName)
Creates a containerjava.lang.String
createReadOrderRequest(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.ContainerInformation
getContainerInformation(java.lang.String containerName)
Get container information like capacityorg.jclouds.blobstore.BlobStoreContext
getContext(StorageConfiguration configuration)
enables the connection to a storage service with the param providedint
getMaxResults()
MetadatasObject
getObjectMetadata(java.lang.String containerName, java.lang.String objectId, boolean noCache)
get metadata of the objectvoid
removeReadOrderRequest(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
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
-
OpenstackSwift
public OpenstackSwift(StorageConfiguration configuration)
- Parameters:
configuration
-
-
OpenstackSwift
public OpenstackSwift(StorageConfiguration configuration, org.jclouds.openstack.swift.v1.SwiftApi swiftApi, org.jclouds.openstack.swift.v1.features.ContainerApi containerApi, org.jclouds.openstack.swift.v1.features.AccountApi accountApi)
-
-
Method Detail
-
getContainerInformation
public ContainerInformation getContainerInformation(java.lang.String containerName) throws ContentAddressableStorageNotFoundException
Description copied from interface:ContentAddressableStorage
Get container information like capacity- Specified by:
getContainerInformation
in interfaceContentAddressableStorage
- Specified by:
getContainerInformation
in 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:ContentAddressableStorageJcloudsAbstract
enables the connection to a storage service with the param provided- Specified by:
getContext
in classContentAddressableStorageJcloudsAbstract
- Parameters:
configuration
- the storage configuration- Returns:
- BlobStoreContext
-
closeContext
public void closeContext()
Description copied from class:ContentAddressableStorageJcloudsAbstract
Close context according to implementation (http client not closed)- Specified by:
closeContext
in classContentAddressableStorageJcloudsAbstract
-
close
public void close()
-
createContainer
public void createContainer(java.lang.String containerName)
Description copied from interface:ContentAddressableStorage
Creates a container- Specified by:
createContainer
in interfaceContentAddressableStorage
- Overrides:
createContainer
in classContentAddressableStorageJcloudsAbstract
- Parameters:
containerName
- name of container to create
-
createReadOrderRequest
public java.lang.String createReadOrderRequest(java.lang.String containerName, java.util.List<java.lang.String> objectsIds) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
Description copied from interface:ContentAddressableStorage
Create 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
- Throws:
ContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageException
- Thrown when get action failed due some other failureContentAddressableStorageAlreadyExistException
- Thrown when object creating exists
-
removeReadOrderRequest
public void removeReadOrderRequest(java.lang.String readRequestID) throws ContentAddressableStorageServerException
Description copied from interface:ContentAddressableStorage
Purge all read request id to cleanup local FS- Parameters:
readRequestID
- the read request ID.- Throws:
ContentAddressableStorageServerException
-
getMaxResults
public int getMaxResults()
- Returns:
- the maxResults
-
getObjectMetadata
public MetadatasObject getObjectMetadata(java.lang.String containerName, java.lang.String objectId, boolean noCache) throws ContentAddressableStorageException
Description copied from interface:ContentAddressableStorage
get 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
-
-