BlobsStorage Class

  • java.lang.Object
    • com.microsoft.bot.azure.blobs.BlobsStorage

Implements

public class BlobsStorage
implements Storage

Implements Storage using Azure Storage Blobs. This class uses a single Azure Storage Blob Container. Each entity or StoreItem is serialized into a JSON string and stored in an individual text blob. Each blob is named after the store item key, which is encoded so that it conforms a valid blob name. an entity is an StoreItem, the storage object will set the entity's StoreItem property value to the blob's ETag upon read. Afterward, an BlobRequestConditions with the ETag value will be generated during Write. New entities start with a null ETag.

Constructor Summary

Constructor Description
BlobsStorage(String dataConnectionString, String containerName)

Initializes a new instance of the BlobsStorage class.

Method Summary

Modifier and Type Method and Description
java.util.concurrent.CompletableFuture<java.lang.Void> delete(String[] keys)

Deletes entity blobs from the configured container.

java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> read(String[] keys)

Retrieve entities from the configured blob container.

java.util.concurrent.CompletableFuture<java.lang.Void> write(Map<String,Object> changes)

Stores a new entity in the configured blob container.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

BlobsStorage

public BlobsStorage(String dataConnectionString, String containerName)

Initializes a new instance of the BlobsStorage class.

Parameters:

dataConnectionString - Azure Storage connection string.
containerName - Name of the Blob container where entities will be stored.

Method Details

delete

public CompletableFuture delete(String[] keys)

Deletes entity blobs from the configured container.

Parameters:

keys - An array of entity keys.

Returns:

A task that represents the work queued to execute.

read

public CompletableFuture> read(String[] keys)

Retrieve entities from the configured blob container.

Parameters:

keys - An array of entity keys.

Returns:

A task that represents the work queued to execute.

write

public CompletableFuture write(Map changes)

Stores a new entity in the configured blob container.

Parameters:

changes - The changes to write to storage.

Returns:

A task that represents the work queued to execute.

Applies to