public class FsBlobContainer extends AbstractBlobContainer
| Modifier and Type | Field and Description |
|---|---|
protected FsBlobStore |
blobStore |
protected Path |
path |
| Constructor and Description |
|---|
FsBlobContainer(FsBlobStore blobStore,
BlobPath blobPath,
Path path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
blobExists(String blobName) |
void |
deleteBlob(String blobName)
Deletes a blob with giving name.
|
com.google.common.collect.ImmutableMap<String,BlobMetaData> |
listBlobs()
Lists all blobs in the container
|
com.google.common.collect.ImmutableMap<String,BlobMetaData> |
listBlobsByPrefix(String blobNamePrefix)
Lists all blobs in the container that match specified prefix
|
void |
move(String source,
String target)
Atomically renames source blob into target blob
|
InputStream |
readBlob(String name)
Creates a new InputStream for the given blob name
|
void |
writeBlob(String blobName,
BytesReference data)
Writes bytes to the blob
|
void |
writeBlob(String blobName,
InputStream inputStream,
long blobSize)
Reads blob content from the input stream and writes it to the blob store
|
deleteBlobs, deleteBlobsByPrefix, pathprotected final FsBlobStore blobStore
protected final Path path
public FsBlobContainer(FsBlobStore blobStore, BlobPath blobPath, Path path)
public com.google.common.collect.ImmutableMap<String,BlobMetaData> listBlobs() throws IOException
BlobContainerIOExceptionpublic com.google.common.collect.ImmutableMap<String,BlobMetaData> listBlobsByPrefix(String blobNamePrefix) throws IOException
BlobContainerIOExceptionpublic void deleteBlob(String blobName) throws IOException
BlobContainerIOExceptionpublic boolean blobExists(String blobName)
public InputStream readBlob(String name) throws IOException
BlobContainerIOExceptionpublic void writeBlob(String blobName, InputStream inputStream, long blobSize) throws IOException
BlobContainerIOExceptionpublic void writeBlob(String blobName, BytesReference data) throws IOException
BlobContainerIOExceptionpublic void move(String source, String target) throws IOException
BlobContainerIOExceptionCopyright © 2009–2016. All rights reserved.