public abstract class AbstractBlobContainer extends java.lang.Object implements BlobContainer
Modifier | Constructor and Description |
---|---|
protected |
AbstractBlobContainer(BlobPath path) |
Modifier and Type | Method and Description |
---|---|
void |
deleteBlobs(java.util.Collection<java.lang.String> blobNames)
Deletes blobs with the given names.
|
void |
deleteBlobsByPrefix(java.lang.String blobNamePrefix)
Deletes all blobs in the container that match the specified prefix.
|
BlobPath |
path()
Gets the
BlobPath that defines the implementation specific paths to where the blobs are contained. |
void |
writeBlob(java.lang.String blobName,
BytesReference bytes)
Writes the input bytes to a new blob in the container with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
blobExists, deleteBlob, listBlobs, listBlobsByPrefix, move, readBlob, writeBlob
protected AbstractBlobContainer(BlobPath path)
public BlobPath path()
BlobContainer
BlobPath
that defines the implementation specific paths to where the blobs are contained.path
in interface BlobContainer
public void deleteBlobsByPrefix(java.lang.String blobNamePrefix) throws java.io.IOException
BlobContainer
deleteBlobsByPrefix
in interface BlobContainer
blobNamePrefix
- The prefix to match against blob names in the container. Any blob whose name has the prefix will be deleted.java.io.IOException
- if any of the matching blobs failed to delete.public void deleteBlobs(java.util.Collection<java.lang.String> blobNames) throws java.io.IOException
BlobContainer
deleteBlobs
in interface BlobContainer
blobNames
- The collection of blob names to delete from the container.java.io.IOException
- if any of the blobs in the collection exists but could not be deleted.public void writeBlob(java.lang.String blobName, BytesReference bytes) throws java.io.IOException
BlobContainer
IOException
will be thrown.
TODO: Remove this in favor of a single BlobContainer.writeBlob(String, InputStream, long)
method.
See https://github.com/elastic/elasticsearch/issues/18528writeBlob
in interface BlobContainer
blobName
- The name of the blob to write the contents of the input stream to.bytes
- The bytes to write to the blob.java.io.IOException
- if a blob by the same name already exists, or the target blob could not be written to.