public interface DefaultOfferService
| Modifier and Type | Field and Description |
|---|---|
static String |
STORAGE_CONF_FILE_NAME |
| Modifier and Type | Method and Description |
|---|---|
StorageBulkPutResult |
bulkPutObjects(String containerName,
List<String> objectIds,
MultiplexedStreamReader multiplexedStreamReader,
DataCategory type,
DigestType digestType) |
String |
createCursor(String containerName)
Create a new cursor for listing container operation
|
String |
createObject(String containerName,
String objectId,
InputStream objectPart,
DataCategory type,
Long size,
DigestType digestType)
Create object on container with objectId Receive object part of object.
|
Optional<TapeReadRequestReferentialEntity> |
createReadOrderRequest(String containerName,
List<String> objectsIds)
create read order (asynchronous read from tape to local FS) for the given @containerName and objects list.
|
void |
deleteObject(String containerName,
String objectId,
DataCategory type)
Deletes a object representing the data at location containerName/objectName
|
void |
finalizeCursor(String containerName,
String cursorId)
Close the cursor
|
ContainerInformation |
getCapacity(String containerName)
Get container capacity
|
StorageMetadataResult |
getMetadata(String containerName,
String objectId,
boolean noCache)
Get Metadata
|
ObjectContent |
getObject(String containerName,
String objectId)
Get object on offer as an inputStream
|
String |
getObjectDigest(String containerName,
String objectId,
DigestType digestAlgorithm)
Get offer storage digest of object
|
List<OfferLog> |
getOfferLogs(String containerName,
Long offset,
int limit,
Order order)
Get the offer log of objects created in offer container
|
Optional<TapeReadRequestReferentialEntity> |
getReadOrderRequest(String readRequestID) |
boolean |
hasNext(String containerName,
String cursorId)
Check if iterator have a next value
|
boolean |
isObjectExist(String containerName,
String objectId)
Check if object exists
|
List<com.fasterxml.jackson.databind.JsonNode> |
next(String containerName,
String cursorId)
Get next values
|
void |
removeReadOrderRequest(String readRequestID) |
static final String STORAGE_CONF_FILE_NAME
String getObjectDigest(String containerName, String objectId, DigestType digestAlgorithm) throws ContentAddressableStorageException
containerName - the container with the objectobjectId - the object name / iddigestAlgorithm - the digest algorithmContentAddressableStorageException - thrown on storage errorObjectContent getObject(String containerName, String objectId) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
containerName - the container containing the objectobjectId - the object idContentAddressableStorageNotFoundException - thrown when object does not existsContentAddressableStorageException - thrown when a server error occursOptional<TapeReadRequestReferentialEntity> createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageException
containerName - the container containing the objectobjectsIds - the objects idsContentAddressableStorageNotFoundException - thrown when object does not existsContentAddressableStorageException - thrown when a server error occursOptional<TapeReadRequestReferentialEntity> getReadOrderRequest(String readRequestID) throws ContentAddressableStorageException
void removeReadOrderRequest(String readRequestID) throws ContentAddressableStorageException
String createObject(String containerName, String objectId, InputStream objectPart, DataCategory type, Long size, DigestType digestType) throws ContentAddressableStorageException
containerName - the container nameobjectId - the offer objectId to createobjectPart - the part of the object to create (chunk style)type - the object type to createsize - inputstream sizedigestType - digest of objectContentAddressableStorageException - if the container does not existStorageBulkPutResult bulkPutObjects(String containerName, List<String> objectIds, MultiplexedStreamReader multiplexedStreamReader, DataCategory type, DigestType digestType) throws ContentAddressableStorageException, IOException
boolean isObjectExist(String containerName, String objectId) throws ContentAddressableStorageServerException
containerName - the container suppose to contain the objectobjectId - the objectId to checkContentAddressableStorageServerExceptionContainerInformation getCapacity(String containerName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName - the container nameContentAddressableStorageNotFoundException - thrown if the container does not existContentAddressableStorageServerExceptionvoid deleteObject(String containerName, String objectId, DataCategory type) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageException
containerName - container where this exists.objectId - the objectId to deletetype - the object type to deleteContentAddressableStorageNotFoundException - 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 failureStorageMetadataResult getMetadata(String containerName, String objectId, boolean noCache) throws ContentAddressableStorageException, IOException
containerName - objectId - noCache - ContentAddressableStorageExceptionIOExceptionString createCursor(String containerName) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName - the container nameContentAddressableStorageNotFoundException - thrown when the container cannot be locatedContentAddressableStorageServerException - thrown when delete action failed due some other failureboolean hasNext(String containerName, String cursorId)
containerName - the container namecursorId - the cursor IDList<com.fasterxml.jackson.databind.JsonNode> next(String containerName, String cursorId) throws ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException
containerName - the container namecursorId - the cursor IDContentAddressableStorageNotFoundException - thrown when the container cannot be locatedContentAddressableStorageServerExceptionvoid finalizeCursor(String containerName, String cursorId)
containerName - the container namecursorId - the cursor IDList<OfferLog> getOfferLogs(String containerName, Long offset, int limit, Order order) throws ContentAddressableStorageDatabaseException, ContentAddressableStorageServerException
containerName - container the container nameoffset - the offset of the object before the wanted listlimit - number of objects wantedorder - order of searchContentAddressableStorageDatabaseException - Database errorContentAddressableStorageServerException - Parsing errorCopyright © 2019 Vitam. All rights reserved.