Table of Contents

Interface IStorageDriver

Namespace
Temporalio.Converters
Assembly
Temporalio.dll

Driver that stores and retrieves payloads in an external storage system.

public interface IStorageDriver

Remarks

Implementations are called concurrently, so they must be thread-safe.

Properties

Name

Gets the name of this driver instance. This is written into history alongside every payload the driver stores and is used to route retrieval back to the same driver.

string Name { get; }

Property Value

string

Remarks

Renaming a deployed driver makes every payload stored under the old name unretrievable, so this must be treated as permanent once in use.

Type

Gets the identifier for this driver implementation, e.g. aws.s3driver. Unlike Name, this is identical across every instance of the same implementation and across SDK languages. It is only reported in worker heartbeats.

string Type { get; }

Property Value

string

Methods

RetrieveAsync(StorageDriverRetrieveContext, IReadOnlyCollection<StorageDriverClaim>, CancellationToken)

Retrieve the payloads for the given claims, in the same order.

Task<IReadOnlyCollection<Payload>> RetrieveAsync(StorageDriverRetrieveContext context, IReadOnlyCollection<StorageDriverClaim> claims, CancellationToken cancellationToken)

Parameters

context StorageDriverRetrieveContext

Context for this retrieve operation, carrying the limiter each request must be run through.

claims IReadOnlyCollection<StorageDriverClaim>

Claims to retrieve. Do not mutate these.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task<IReadOnlyCollection<Payload>>

The stored payloads. This must return exactly one payload per given claim, in the same order.

Exceptions

OperationCanceledException

Cancellation requested.

StoreAsync(StorageDriverStoreContext, IReadOnlyCollection<Payload>, CancellationToken)

Store the given payloads, returning one claim per payload in the same order.

Task<IReadOnlyCollection<StorageDriverClaim>> StoreAsync(StorageDriverStoreContext context, IReadOnlyCollection<Payload> payloads, CancellationToken cancellationToken)

Parameters

context StorageDriverStoreContext

Context for this store operation, carrying the limiter each request must be run through.

payloads IReadOnlyCollection<Payload>

Payloads to store. Do not mutate these.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task<IReadOnlyCollection<StorageDriverClaim>>

Claims identifying the stored payloads. This must return exactly one claim per given payload, in the same order.

Exceptions

OperationCanceledException

Cancellation requested.