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,AutoCloseable
Creates
BlobStoreContext configured on StorageConfiguration
storage.conf file . This can be used to make an information about container.- See Also:
-
SwiftApiBlobStoreContext-
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
contextFields inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
LISTING_MAX_RESULTS -
Constructor Summary
ConstructorsConstructorDescriptionOpenstackSwift(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
Modifier and TypeMethodDescriptionvoidclose()voidClose context according to implementation (http client not closed)voidcreateContainer(String containerName) Creates a containergetContainerInformation(String containerName) Get container information like capacityorg.jclouds.blobstore.BlobStoreContextgetContext(StorageConfiguration configuration) enables the connection to a storage service with the param providedintgetObjectMetadata(String containerName, String objectId, boolean noCache) get metadata of the objectMethods inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageJcloudsAbstract
checkObjectDigestAndStoreDigest, deleteObject, getObject, getObjectDigest, isExistingContainer, isExistingObject, listContainer, writeObjectMethods inherited from class fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
cacheExistsContainer, computeObjectDigest, computeObjectDigestAndSize, disableContainerCaching, getConfiguration, isExistingContainerInCacheMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorage
checkAccessRequestStatuses, checkObjectAvailability, createAccessRequest, putObject, removeAccessRequest
-
Constructor Details
-
OpenstackSwift
- 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 Details
-
getContainerInformation
public ContainerInformation getContainerInformation(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
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
-
closeContext
public void closeContext()Description copied from class:ContentAddressableStorageJcloudsAbstractClose context according to implementation (http client not closed)- Specified by:
closeContextin classContentAddressableStorageJcloudsAbstract
-
close
public void close() -
createContainer
Description copied from interface:ContentAddressableStorageCreates a container- Specified by:
createContainerin interfaceContentAddressableStorage- Overrides:
createContainerin classContentAddressableStorageJcloudsAbstract- Parameters:
containerName- name of container to create
-
getMaxResults
public int getMaxResults()- Returns:
- the maxResults
-
getObjectMetadata
public MetadatasObject getObjectMetadata(String containerName, 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
-