Package org.jclouds.blobstore
Class TransientStorageStrategy
java.lang.Object
org.jclouds.blobstore.TransientStorageStrategy
- All Implemented Interfaces:
LocalStorageStrategy
-
Method Summary
Modifier and TypeMethodDescriptionbooleanblobExists(String containerName, String blobName) Return true if a blob named by key existsvoidclearContainer(String containerName) Empty the container of its content (files and subdirectories), but doesn't delete the container itselfvoidclearContainer(String containerName, ListContainerOptions options) LikeLocalStorageStrategy.clearContainer(String)except you can use options to do things like recursive deletes, or clear at a different path than root.booleancontainerExists(String containerName) Checks if a container existsbooleancreateContainerInLocation(String containerName, Location location, CreateContainerOptions options) Creates a new containervoiddeleteContainer(String containerName) Deletes a container and all its contentReturn an iterator that reports all the containers under base pathLoad the blob with the given key belonging to the container with the given name.getBlobAccess(String containerName, String blobName) getBlobKeysInsideContainer(String containerName, String prefix) Returns all the blobs key inside a containergetContainerAccess(String container) getContainerMetadata(String container) getLocation(String containerName) putBlob(String containerName, Blob blob, BlobAccess access) Write aBlobinto a filevoidremoveBlob(String containerName, String blobName) Remove blob named by the given keyvoidsetBlobAccess(String containerName, String blobName, BlobAccess access) voidsetContainerAccess(String container, ContainerAccess access)
-
Method Details
-
containerExists
Description copied from interface:LocalStorageStrategyChecks if a container exists- Specified by:
containerExistsin interfaceLocalStorageStrategy- Parameters:
containerName-- Returns:
-
getAllContainerNames
Description copied from interface:LocalStorageStrategyReturn an iterator that reports all the containers under base path- Specified by:
getAllContainerNamesin interfaceLocalStorageStrategy- Returns:
-
createContainerInLocation
public boolean createContainerInLocation(String containerName, Location location, CreateContainerOptions options) Description copied from interface:LocalStorageStrategyCreates a new container- Specified by:
createContainerInLocationin interfaceLocalStorageStrategy- Parameters:
containerName-- Returns:
-
getContainerAccess
- Specified by:
getContainerAccessin interfaceLocalStorageStrategy
-
setContainerAccess
- Specified by:
setContainerAccessin interfaceLocalStorageStrategy
-
deleteContainer
Description copied from interface:LocalStorageStrategyDeletes a container and all its content- Specified by:
deleteContainerin interfaceLocalStorageStrategy- Parameters:
containerName-
-
clearContainer
Description copied from interface:LocalStorageStrategyEmpty the container of its content (files and subdirectories), but doesn't delete the container itself- Specified by:
clearContainerin interfaceLocalStorageStrategy- Parameters:
containerName-
-
clearContainer
Description copied from interface:LocalStorageStrategyLikeLocalStorageStrategy.clearContainer(String)except you can use options to do things like recursive deletes, or clear at a different path than root.- Specified by:
clearContainerin interfaceLocalStorageStrategy- Parameters:
containerName- what to clearoptions- recursion and path to clear
-
getContainerMetadata
- Specified by:
getContainerMetadatain interfaceLocalStorageStrategy- Returns:
- StorageMetadata associated with a container name, e.g., creation date and location, or null if container does not exist
-
blobExists
Description copied from interface:LocalStorageStrategyReturn true if a blob named by key exists- Specified by:
blobExistsin interfaceLocalStorageStrategy- Parameters:
containerName-blobName-- Returns:
-
getBlobKeysInsideContainer
Description copied from interface:LocalStorageStrategyReturns all the blobs key inside a container- Specified by:
getBlobKeysInsideContainerin interfaceLocalStorageStrategy- Parameters:
containerName-- Returns:
-
getBlob
Description copied from interface:LocalStorageStrategyLoad the blob with the given key belonging to the container with the given name. There must exist a resource on the file system whose complete name is given concatenating the container name and the key- Specified by:
getBlobin interfaceLocalStorageStrategy- Returns:
- the blob belonging to the given container with the given key
-
putBlob
- Specified by:
putBlobin interfaceLocalStorageStrategy- Throws:
IOException
-
putBlob
Description copied from interface:LocalStorageStrategyWrite aBlobinto a file- Specified by:
putBlobin interfaceLocalStorageStrategy- Parameters:
blob-access-- Returns:
- etag of blob
- Throws:
IOException
-
removeBlob
Description copied from interface:LocalStorageStrategyRemove blob named by the given key- Specified by:
removeBlobin interfaceLocalStorageStrategy- Parameters:
containerName-blobName-
-
getBlobAccess
- Specified by:
getBlobAccessin interfaceLocalStorageStrategy
-
setBlobAccess
- Specified by:
setBlobAccessin interfaceLocalStorageStrategy
-
getLocation
- Specified by:
getLocationin interfaceLocalStorageStrategy- Parameters:
containerName- name of container- Returns:
- Location of container or null
-
getSeparator
- Specified by:
getSeparatorin interfaceLocalStorageStrategy- Returns:
- path separator, either / or \
-