public interface Connection extends AutoCloseable
myDriver.connect(serviceUrl, parameters);
AutoCloseable
so the connection implementation MUST provide a close() method which
responsibility is to cleanly close and remove.Modifier and Type | Method and Description |
---|---|
StorageCheckResult |
checkObject(StorageCheckRequest request)
Check an object in order to validate its transfer
|
void |
close()
Override AutoCloseable implementation to specify the exception
|
StorageCountResult |
countObjects(StorageRequest request)
Count the number of binary objects ine the container
|
StorageMetadatasResult |
getMetadatas(StorageObjectRequest request)
Get metadata of object
|
StorageGetResult |
getObject(StorageObjectRequest request)
Retrieve an object from the storage offer based on criterias defined in request argument.
|
RequestResponse<OfferLog> |
getOfferLogs(StorageOfferLogRequest request)
Get a listing of offer logs on a container type
|
StorageCapacityResult |
getStorageCapacity(Integer tenantId)
Retrieve the remaining storage capacity available on the distant offer.
|
RequestResponse<com.fasterxml.jackson.databind.JsonNode> |
listObjects(StorageListRequest request)
List object on a container type
|
boolean |
objectExistsInOffer(StorageObjectRequest request)
Check if an object is present in the offer
|
StoragePutResult |
putObject(StoragePutRequest request)
Put the object file into the storage offer based on criterias defined in request argument and underlaying
connection parameters.
|
StorageRemoveResult |
removeObject(StorageRemoveRequest request)
Delete an object on the distant storage offer.
|
StorageCapacityResult getStorageCapacity(Integer tenantId) throws StorageDriverPreconditionFailedException, StorageDriverNotFoundException, StorageDriverException
tenantId
- the tenant id needed to get storage capacityStorageDriverPreconditionFailedException
- if a bad request is encounteredStorageDriverNotFoundException
- if container is not foundStorageDriverException
- if any problem occurs during requestStorageCountResult countObjects(StorageRequest request) throws StorageDriverException
request
- the request to send. It contains informations of the container.StorageDriverException
- if any problem occurs during requestStorageGetResult getObject(StorageObjectRequest request) throws StorageDriverException
request
- the request to send. It contains informations needed to retrieve a given object.StorageDriverException
- if any problem occurs during requestIllegalArgumentException
- if request is wrongStoragePutResult putObject(StoragePutRequest request) throws StorageDriverException
request
- the request to send. It may contains informations needed to store the file.StorageDriverException
- if any problem occurs during requestStorageRemoveResult removeObject(StorageRemoveRequest request) throws StorageDriverException
request
- the request to send, it contains information needed to delete an object on the distant storeStorageDriverException
- if any problem occurs during requestboolean objectExistsInOffer(StorageObjectRequest request) throws StorageDriverException
request
- the request to send. It contains informations needed to retrieve a given object.StorageDriverException
- if any problem occurs during requestStorageCheckResult checkObject(StorageCheckRequest request) throws StorageDriverException
request
- the request to send. It contains informations needed to check the object.StorageDriverException
- if any problem occurs during requestStorageMetadatasResult getMetadatas(StorageObjectRequest request) throws StorageDriverException
request
- StorageDriverException
RequestResponse<com.fasterxml.jackson.databind.JsonNode> listObjects(StorageListRequest request) throws StorageDriverException
request
- the request contains data needed to list container typeStorageDriverException
RequestResponse<OfferLog> getOfferLogs(StorageOfferLogRequest request) throws StorageDriverException
request
- the request contains data needed to retrieve the listing of the containerStorageDriverException
- to be thrown in case of any driver exceptionvoid close() throws StorageDriverException
close
in interface AutoCloseable
StorageDriverException
- to be thrown in case of any driver exceptionCopyright © 2018 Vitam. All rights reserved.