Class ContentAddressableStorageAbstract
- java.lang.Object
-
- fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorageAbstract
-
- All Implemented Interfaces:
VitamAutoCloseable
,ContentAddressableStorage
,java.lang.AutoCloseable
- Direct Known Subclasses:
AmazonS3V1
,ContentAddressableStorageJcloudsAbstract
,HashFileSystem
,Swift
public abstract class ContentAddressableStorageAbstract extends java.lang.Object implements ContentAddressableStorage
Abstract class of CAS that contains common methos
-
-
Field Summary
Fields Modifier and Type Field Description static int
LISTING_MAX_RESULTS
Max result for listing option TODO: have to be configurable ?
-
Constructor Summary
Constructors Modifier Constructor Description protected
ContentAddressableStorageAbstract(StorageConfiguration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cacheExistsContainer(java.lang.String containerName, boolean exists)
This handle cache already existing container Prevent handling an i/o check container exists Do only memory check if the container is already existsprotected java.lang.String
computeObjectDigest(java.lang.String containerName, java.lang.String objectName, DigestType algo)
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Long>
computeObjectDigestAndSize(java.lang.String containerName, java.lang.String objectName, DigestType algo)
static void
disableContainerCaching()
StorageConfiguration
getConfiguration()
protected boolean
isExistingContainerInCache(java.lang.String containerName)
Determines if a container exists in cache-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.gouv.vitam.common.storage.cas.container.api.ContentAddressableStorage
checkAccessRequestStatuses, checkObjectAvailability, checkObjectDigestAndStoreDigest, createAccessRequest, createContainer, deleteObject, getContainerInformation, getObject, getObjectDigest, getObjectMetadata, isExistingContainer, isExistingObject, listContainer, putObject, removeAccessRequest, writeObject
-
Methods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable
close
-
-
-
-
Field Detail
-
LISTING_MAX_RESULTS
public static final int LISTING_MAX_RESULTS
Max result for listing option TODO: have to be configurable ?- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContentAddressableStorageAbstract
protected ContentAddressableStorageAbstract(StorageConfiguration configuration)
-
-
Method Detail
-
getConfiguration
public StorageConfiguration getConfiguration()
-
computeObjectDigest
protected java.lang.String computeObjectDigest(java.lang.String containerName, java.lang.String objectName, DigestType algo) throws ContentAddressableStorageException
-
computeObjectDigestAndSize
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Long> computeObjectDigestAndSize(java.lang.String containerName, java.lang.String objectName, DigestType algo) throws ContentAddressableStorageException
-
isExistingContainerInCache
protected boolean isExistingContainerInCache(java.lang.String containerName)
Determines if a container exists in cache- Parameters:
containerName
- name of container- Returns:
- boolean type
- Throws:
ContentAddressableStorageServerException
- Thrown when internal server error happens
-
cacheExistsContainer
protected void cacheExistsContainer(java.lang.String containerName, boolean exists)
This handle cache already existing container Prevent handling an i/o check container exists Do only memory check if the container is already exists- Parameters:
containerName
-exists
-
-
disableContainerCaching
public static void disableContainerCaching()
-
-