public interface LocalStorageStrategy
Modifier and Type | Method and Description |
---|---|
boolean |
blobExists(String container,
String key)
Return true if a blob named by key exists
|
void |
clearContainer(String container)
Empty the container of its content (files and subdirectories), but doesn't
delete the container itself
|
void |
clearContainer(String container,
ListContainerOptions options)
Like
clearContainer(String) except you can use options to do things like recursive
deletes, or clear at a different path than root. |
boolean |
containerExists(String container)
Checks if a container exists
|
boolean |
createContainerInLocation(String container,
Location location,
CreateContainerOptions options)
Creates a new container
|
void |
deleteContainer(String container)
Deletes a container and all its content
|
Iterable<String> |
getAllContainerNames()
Return an iterator that reports all the containers under base path
|
Blob |
getBlob(String containerName,
String blobName)
Load the blob with the given key belonging to the container with the given
name.
|
BlobAccess |
getBlobAccess(String container,
String key) |
Iterable<String> |
getBlobKeysInsideContainer(String container)
Returns all the blobs key inside a container
|
ContainerAccess |
getContainerAccess(String container) |
StorageMetadata |
getContainerMetadata(String container) |
Location |
getLocation(String containerName) |
String |
getSeparator() |
String |
putBlob(String containerName,
Blob blob)
Write a
Blob into a file |
void |
removeBlob(String container,
String key)
Remove blob named by the given key
|
void |
setBlobAccess(String container,
String key,
BlobAccess access) |
void |
setContainerAccess(String container,
ContainerAccess access) |
boolean containerExists(String container)
container
- Iterable<String> getAllContainerNames()
boolean createContainerInLocation(String container, Location location, CreateContainerOptions options)
container
- ContainerAccess getContainerAccess(String container)
void setContainerAccess(String container, ContainerAccess access)
void deleteContainer(String container)
container
- void clearContainer(String container)
container
- void clearContainer(String container, ListContainerOptions options)
clearContainer(String)
except you can use options to do things like recursive
deletes, or clear at a different path than root.container
- what to clearoptions
- recursion and path to clearStorageMetadata getContainerMetadata(String container)
boolean blobExists(String container, String key)
container
- key
- Iterable<String> getBlobKeysInsideContainer(String container) throws IOException
container
- IOException
Blob getBlob(String containerName, String blobName)
container
- it's the name of the container the blob belongs tokey
- it's the key of the blobString putBlob(String containerName, Blob blob) throws IOException
Blob
into a filecontainer
- blob
- IOException
void removeBlob(String container, String key)
container
- key
- BlobAccess getBlobAccess(String container, String key)
void setBlobAccess(String container, String key, BlobAccess access)
Location getLocation(String containerName)
containerName
- name of containerString getSeparator()
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.