public class TransientStorageStrategy extends Object implements LocalStorageStrategy
Modifier and Type | Method and Description |
---|---|
boolean |
blobExists(String containerName,
String blobName)
Return true if a blob named by key exists
|
void |
clearContainer(String containerName)
Empty the container of its content (files and subdirectories), but doesn't
delete the container itself
|
void |
clearContainer(String containerName,
ListContainerOptions options)
Like
LocalStorageStrategy.clearContainer(String) except you can use options to do things like recursive
deletes, or clear at a different path than root. |
boolean |
containerExists(String containerName)
Checks if a container exists
|
boolean |
createContainerInLocation(String containerName,
Location location,
CreateContainerOptions options)
Creates a new container
|
void |
deleteContainer(String containerName)
Deletes a container and all its content
|
Collection<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 containerName,
String blobName) |
Iterable<String> |
getBlobKeysInsideContainer(String containerName)
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 containerName,
String blobName)
Remove blob named by the given key
|
void |
setBlobAccess(String containerName,
String blobName,
BlobAccess access) |
void |
setContainerAccess(String container,
ContainerAccess access) |
public boolean containerExists(String containerName)
LocalStorageStrategy
containerExists
in interface LocalStorageStrategy
public Collection<String> getAllContainerNames()
LocalStorageStrategy
getAllContainerNames
in interface LocalStorageStrategy
public boolean createContainerInLocation(String containerName, Location location, CreateContainerOptions options)
LocalStorageStrategy
createContainerInLocation
in interface LocalStorageStrategy
public ContainerAccess getContainerAccess(String container)
getContainerAccess
in interface LocalStorageStrategy
public void setContainerAccess(String container, ContainerAccess access)
setContainerAccess
in interface LocalStorageStrategy
public void deleteContainer(String containerName)
LocalStorageStrategy
deleteContainer
in interface LocalStorageStrategy
public void clearContainer(String containerName)
LocalStorageStrategy
clearContainer
in interface LocalStorageStrategy
public void clearContainer(String containerName, ListContainerOptions options)
LocalStorageStrategy
LocalStorageStrategy.clearContainer(String)
except you can use options to do things like recursive
deletes, or clear at a different path than root.clearContainer
in interface LocalStorageStrategy
containerName
- what to clearoptions
- recursion and path to clearpublic StorageMetadata getContainerMetadata(String container)
getContainerMetadata
in interface LocalStorageStrategy
public boolean blobExists(String containerName, String blobName)
LocalStorageStrategy
blobExists
in interface LocalStorageStrategy
public Iterable<String> getBlobKeysInsideContainer(String containerName)
LocalStorageStrategy
getBlobKeysInsideContainer
in interface LocalStorageStrategy
public Blob getBlob(String containerName, String blobName)
LocalStorageStrategy
getBlob
in interface LocalStorageStrategy
public String putBlob(String containerName, Blob blob) throws IOException
LocalStorageStrategy
Blob
into a fileputBlob
in interface LocalStorageStrategy
IOException
public void removeBlob(String containerName, String blobName)
LocalStorageStrategy
removeBlob
in interface LocalStorageStrategy
public BlobAccess getBlobAccess(String containerName, String blobName)
getBlobAccess
in interface LocalStorageStrategy
public void setBlobAccess(String containerName, String blobName, BlobAccess access)
setBlobAccess
in interface LocalStorageStrategy
public Location getLocation(String containerName)
getLocation
in interface LocalStorageStrategy
containerName
- name of containerpublic String getSeparator()
getSeparator
in interface LocalStorageStrategy
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.