public interface ObjectStorageClient
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Terminate all connections and shut down this client
|
void |
delete(String objectName)
Deletes an object, if present.
|
Optional<StorageObject> |
get(String objectName)
Gets the
StorageObject including its body. |
Optional<StorageObject> |
get(String objectName,
boolean verify)
Gets the
StorageObject including its body. |
String |
getBucketName() |
byte[] |
getContent(String objectName)
Get the content of the specified object and return it as a byte array.
|
ObjectMetadata |
getMetaData(String objectName)
Get the metadata of the specified object
|
String |
getName() |
Optional<StorageObject> |
getWithoutBody(String objectName)
Gets the
StorageObject metadata without its body. |
boolean |
isAvailable(String id)
Check if an object with the provided id exists
|
List<StorageObject> |
list() |
String |
put(StorageObject storageObject)
Creates or updates a
StorageObject. |
String |
put(String id,
org.jclouds.io.Payload value)
Creates or updates a
StorageObject. |
String getName()
String getBucketName()
List<StorageObject> list()
StorageObject.boolean isAvailable(String id)
id - String put(String id, org.jclouds.io.Payload value)
StorageObject.id - corresponds to StorageObject.getName().value - corresponds to StorageObject.getPayload().StorageObject.getETag() of the object.String put(StorageObject storageObject)
StorageObject.storageObject - corresponds to StorageObject.getName().StorageObject.getETag() of the object.Optional<StorageObject> getWithoutBody(String objectName)
StorageObject metadata without its body.objectName - corresponds to StorageObject.getName().StorageObject or empty Optional, if not found.Optional<StorageObject> get(String objectName)
StorageObject including its body.
Note that as of version 1.3 we no longer verify if the object was retrieved correctly. To do this you need to use
get(String, boolean) methodobjectName - corresponds to StorageObject.getName().StorageObject or empty Optional, if not found.Optional<StorageObject> get(String objectName, boolean verify) throws ContentValidationException
StorageObject including its body.objectName - corresponds to StorageObject.getName().verify - if true then the MD5 hash of the downloaded content is compared to the known MD5 hash stored on the
serverStorageObject or empty Optional, if not found.ContentValidationException - thrown when verification of the validity of downloaded content fails.byte[] getContent(String objectName)
objectName - corresponds to StorageObject.getName().ObjectMetadata getMetaData(String objectName)
objectName - corresponds to StorageObject.getName().void delete(String objectName)
objectName - corresponds to StorageObject.getName().void close()
Copyright © 2020. All rights reserved.