public interface ContentAddressableStorage extends VitamAutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
createContainer(String containerName)
Creates a container
|
String |
createReadOrderRequest(String containerName,
List<String> objectsIds)
Create read order (asynchronous read from tape to local FS) for the given objects representing the data at location containerName/objectId.
|
void |
deleteObject(String containerName,
String objectName)
Deletes a object representing the data at location containerName/objectName
|
ContainerInformation |
getContainerInformation(String containerName)
Get container information like capacity
|
ObjectContent |
getObject(String containerName,
String objectName)
Retrieves an object representing the data at location containerName/objectName
|
String |
getObjectDigest(String containerName,
String objectName,
DigestType algo,
boolean noCache)
compute Object Digest using a defined algorithm
|
MetadatasObject |
getObjectMetadata(String containerName,
String objectId,
boolean noCache)
get metadata of the object
|
boolean |
isExistingContainer(String containerName)
Determines if a container exists
|
boolean |
isExistingObject(String containerName,
String objectName)
Determines if an object exists
|
VitamPageSet<? extends VitamStorageMetadata> |
listContainer(String containerName)
List container (create cursor)
|
VitamPageSet<? extends VitamStorageMetadata> |
listContainerNext(String containerName,
String nextMarker)
List container (next on cursor)
|
String |
putObject(String containerName,
String objectName,
InputStream stream,
DigestType digestType,
Long size)
Adds an object representing the data at location containerName/objectName
|
void |
removeReadOrderRequest(String readRequestID)
Purge all read request id to cleanup local FS
|
close
void createContainer(String containerName) throws ContentAddressableStorageServerException
containerName
- name of container to createContentAddressableStorageServerException
- Thrown when internal server error happensboolean isExistingContainer(String containerName) throws ContentAddressableStorageServerException
containerName
- name of containerContentAddressableStorageServerException
- Thrown when internal server error happensString putObject(String containerName, String objectName, InputStream stream, DigestType digestType, Long size) throws ContentAddressableStorageException
containerName
- container to place the object.objectName
- fully qualified object name relative to the container.stream
- the datadigestType
- parameter to compute an hash.size
- size off the input streamContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageException
- Thrown when put action failed due some other failureContentAddressableStorageAlreadyExistException
- Thrown when object creating existsObjectContent getObject(String containerName, String objectName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
containerName
- container where this exists.objectName
- fully qualified name relative to the container.ContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageException
- Thrown when get action failed due some other failureContentAddressableStorageAlreadyExistException
- Thrown when object creating existsString createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
containerName
- container where this exists.objectsIds
- list of the fully qualified name relative to the container.ContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageException
- Thrown when get action failed due some other failureContentAddressableStorageAlreadyExistException
- Thrown when object creating existsvoid removeReadOrderRequest(String readRequestID) throws ContentAddressableStorageServerException
readRequestID
- the read request ID.ContentAddressableStorageServerException
void deleteObject(String containerName, String objectName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
containerName
- container where this exists.objectName
- fully qualified name relative to the container.ContentAddressableStorageNotFoundException
- Thrown when the container cannot be located or the blob cannot
be located in the container.ContentAddressableStorageException
- Thrown when delete action failed due some other failureboolean isExistingObject(String containerName, String objectName) throws ContentAddressableStorageServerException
containerName
- container where the object residesobjectName
- fully qualified name relative to the container.ContentAddressableStorageServerException
- Thrown when internal server error happensString getObjectDigest(String containerName, String objectName, DigestType algo, boolean noCache) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException, ContentAddressableStorageException
containerName
- container where this exists.objectName
- fully qualified name relative to the container.algo
- Digest algonoCache
- forces full digest computationContentAddressableStorageNotFoundException
- Thrown when the container or the object cannot be locatedContentAddressableStorageServerException
- Thrown when internal server error happensContentAddressableStorageException
- Thrown when put action failed due some other failureContainerInformation getContainerInformation(String containerName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName
- the container nameContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageServerException
- Thrown when internal server error happensMetadatasObject getObjectMetadata(String containerName, String objectId, boolean noCache) throws ContentAddressableStorageException, IOException
containerName
- the container nameobjectId
- the objectId to checkContentAddressableStorageException
- Thrown when get action failed due some other failureIOException
- if an IOException is encountered with filesIllegalArgumentException
- thrown when containerName or objectId is nullVitamPageSet<? extends VitamStorageMetadata> listContainer(String containerName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName
- the container nameContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageServerException
- Thrown when internal server error happensVitamPageSet<? extends VitamStorageMetadata> listContainerNext(String containerName, String nextMarker) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName
- the container namenextMarker
- the last id of the list to get nextContentAddressableStorageNotFoundException
- Thrown when the container cannot be located.ContentAddressableStorageServerException
- Thrown when internal server error happensCopyright © 2019 Vitam. All rights reserved.