BlobStorage

class BlobStorage(factory: BlobStorage.Factory, prefix: Path, connectionString: String?, storageAccountKey: String?, coroutineContext: CoroutineContext = Dispatchers.IO) : ObjectStore, SupportsMultipart<String>

Used to set configuration options for Azure Blob Storage, which can be used as implementation of an object store.

Requires at least storageAccount and container to be provided - these will need to be accessible to whichever authentication credentials you use. Authentication for the components in the module is done via the DefaultAzureCredential class - you will need to set up authentication using any of the methods listed within the Azure documentation to be able to make use of the operations inside the modules.

For more info on setting up the necessary Azure infrastructure to use Azure Blob Storage as an XTDB object store, see the section on setting up the Azure Resource Manager Stack within our Azure docs.

Example usage, as part of a node config:

Xtdb.openNode {
remoteStorage(
objectStore = azureBlobStorage(
storageAccount = "xtdb-storage-account",
container = "xtdb-container",
) {
prefix = Path.of("my/custom/prefix")
userManagedIdentityClientId = "user-managed-identity-client-id"
storageAccountEndpoint = "https://xtdb-storage-account.privatelink.blob.core.windows.net"
},
),
...
}

Constructors

Link copied to clipboard
constructor(factory: BlobStorage.Factory, prefix: Path, connectionString: String?, storageAccountKey: String?, coroutineContext: CoroutineContext = Dispatchers.IO)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable
@SerialName(value = "!Azure")
data class Factory(val storageAccount: String, val container: String, var prefix: Path? = null, var storageAccountKey: String? = null, var userManagedIdentityClientId: String? = null, var storageAccountEndpoint: String? = null, var remote: RemoteAlias? = null, var coroutineContext: CoroutineContext = Dispatchers.IO) : ObjectStore.Factory

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun copyObject(src: Path, dest: Path): CompletableFuture<Unit>
Link copied to clipboard
open override fun deleteIfExists(k: Path): CompletableFuture<Unit>
Link copied to clipboard
open override fun getObject(k: Path): CompletableFuture<ByteBuffer?>
open override fun getObject(k: Path, outPath: Path): CompletableFuture<Path>
Link copied to clipboard
open override fun listAfter(dir: Path, afterKey: Path): Iterable<ObjectStore.StoredObject>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun putObject(k: Path, buf: ByteBuffer): CompletableFuture<Unit>
Link copied to clipboard
open override fun startMultipart(k: Path): CompletableFuture<IMultipartUpload<String>>