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, path
protected 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
BlobContainer
IOException
public com.google.common.collect.ImmutableMap<String,BlobMetaData> listBlobsByPrefix(String blobNamePrefix) throws IOException
BlobContainer
IOException
public void deleteBlob(String blobName) throws IOException
BlobContainer
IOException
public boolean blobExists(String blobName)
public InputStream readBlob(String name) throws IOException
BlobContainer
IOException
public void writeBlob(String blobName, InputStream inputStream, long blobSize) throws IOException
BlobContainer
IOException
public void writeBlob(String blobName, BytesReference data) throws IOException
BlobContainer
IOException
public void move(String source, String target) throws IOException
BlobContainer
IOException
Copyright © 2009–2016. All rights reserved.