Class AzureBlobStore
- java.lang.Object
-
- org.opensearch.repositories.azure.AzureBlobStore
-
-
Constructor Summary
Constructors Constructor Description AzureBlobStore(RepositoryMetadata metadata, AzureStorageService service, ThreadPool threadPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobContainerblobContainer(BlobPath path)booleanblobExists(java.lang.String blob)java.util.Map<java.lang.String,BlobContainer>children(BlobPath path)voidclose()voiddeleteBlob(java.lang.String blob)DeleteResultdeleteBlobDirectory(java.lang.String path, java.util.concurrent.Executor executor)java.io.InputStreamgetInputStream(java.lang.String blob, long position, java.lang.Long length)LocationModegetLocationMode()Gets the configuredLocationModefor the Azure storage requests.AzureStorageServicegetService()java.util.Map<java.lang.String,BlobMetadata>listBlobsByPrefix(java.lang.String keyPath, java.lang.String prefix)java.util.Map<java.lang.String,java.lang.Long>stats()java.lang.StringtoString()voidwriteBlob(java.lang.String blobName, java.io.InputStream inputStream, long blobSize, boolean failIfAlreadyExists)
-
-
-
Constructor Detail
-
AzureBlobStore
public AzureBlobStore(RepositoryMetadata metadata, AzureStorageService service, ThreadPool threadPool)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getService
public AzureStorageService getService()
-
getLocationMode
public LocationMode getLocationMode()
Gets the configuredLocationModefor the Azure storage requests.
-
blobContainer
public BlobContainer blobContainer(BlobPath path)
- Specified by:
blobContainerin interfaceBlobStore
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
blobExists
public boolean blobExists(java.lang.String blob) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageException
-
deleteBlob
public void deleteBlob(java.lang.String blob) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageException
-
deleteBlobDirectory
public DeleteResult deleteBlobDirectory(java.lang.String path, java.util.concurrent.Executor executor) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException, java.io.IOException
- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageExceptionjava.io.IOException
-
getInputStream
public java.io.InputStream getInputStream(java.lang.String blob, long position, @Nullable java.lang.Long length) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageException
-
listBlobsByPrefix
public java.util.Map<java.lang.String,BlobMetadata> listBlobsByPrefix(java.lang.String keyPath, java.lang.String prefix) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException
- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageException
-
children
public java.util.Map<java.lang.String,BlobContainer> children(BlobPath path) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException
- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageException
-
writeBlob
public void writeBlob(java.lang.String blobName, java.io.InputStream inputStream, long blobSize, boolean failIfAlreadyExists) throws java.net.URISyntaxException, com.azure.storage.blob.models.BlobStorageException, java.io.IOException- Throws:
java.net.URISyntaxExceptioncom.azure.storage.blob.models.BlobStorageExceptionjava.io.IOException
-
-