Table of Contents

Interface ICloudNativeEventStoreInfo

Namespace
Excalibur.Data.CloudNative
Assembly
Excalibur.Data.Abstractions.dll

Provides version query capabilities for cloud-native event stores without loading events. Obtain via GetService(Type) on an event store instance.

public interface ICloudNativeEventStoreInfo

Methods

GetCurrentVersionAsync(string, string, IPartitionKey, CancellationToken)

Gets the current aggregate version without loading events.

Task<long> GetCurrentVersionAsync(string aggregateId, string aggregateType, IPartitionKey partitionKey, CancellationToken cancellationToken)

Parameters

aggregateId string

The aggregate identifier. Must not be null, empty, or white space.

aggregateType string

The aggregate type name. Must not be null, empty, or white space.

partitionKey IPartitionKey

The partition key containing the aggregate.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<long>

The current version, or -1 if the aggregate doesn't exist.

Exceptions

ArgumentException

aggregateId or aggregateType is empty or white space.

ArgumentNullException

aggregateId, aggregateType, or partitionKey is null.