Class AzureStorageService
java.lang.Object
org.opensearch.repositories.azure.AzureStorageService
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ByteSizeValueMaximum allowed blob's block size in Azure blob store.static final ByteSizeValueMaximum blob's block size size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtains aBlobServiceClienton each invocation using the current client settings.client(String clientName, BiConsumer<com.azure.core.http.HttpRequest, com.azure.core.http.HttpResponse> statsCollector) Obtains aBlobServiceClienton each invocation using the current client settings.voidclose()getBlobRequestTimeout(String clientName) refreshAndClearCache(Map<String, org.opensearch.repositories.azure.AzureStorageSettings> clientsSettings) Updates settings for building clients.
-
Field Details
-
MIN_CHUNK_SIZE
Maximum blob's block size size -
MAX_CHUNK_SIZE
Maximum allowed blob's block size in Azure blob store.
-
-
Constructor Details
-
AzureStorageService
-
-
Method Details
-
client
public Tuple<com.azure.storage.blob.BlobServiceClient,Supplier<com.azure.core.util.Context>> client(String clientName) Obtains aBlobServiceClienton each invocation using the current client settings. BlobServiceClient is thread safe and and could be cached but the settings can change, therefore the instance might be recreated from scratch.- Parameters:
clientName- client name- Returns:
- the
BlobServiceClientinstance and context
-
client
public Tuple<com.azure.storage.blob.BlobServiceClient,Supplier<com.azure.core.util.Context>> client(String clientName, BiConsumer<com.azure.core.http.HttpRequest, com.azure.core.http.HttpResponse> statsCollector) Obtains aBlobServiceClienton each invocation using the current client settings. BlobServiceClient is thread safe and and could be cached but the settings can change, therefore the instance might be recreated from scratch.- Parameters:
clientName- client namestatsCollector- statistics collector- Returns:
- the
BlobServiceClientinstance and context
-
refreshAndClearCache
public Map<String,org.opensearch.repositories.azure.AzureStorageSettings> refreshAndClearCache(Map<String, org.opensearch.repositories.azure.AzureStorageSettings> clientsSettings) Updates settings for building clients. Any client cache is cleared. Future client requests will use the new refreshed settings.- Parameters:
clientsSettings- the settings for new clients- Returns:
- the old settings
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getBlobRequestTimeout
-