Table of Contents

Class Shard

Namespace
DynaSharp.Streams
Assembly
DynaSharp.dll

A shard of a stream: a sequence of records that is read in order.

public sealed record Shard : IEquatable<Shard>
Inheritance
Shard
Implements
Inherited Members

Remarks

Shards form a tree. When a shard fills up or DynamoDB repartitions the table, it is closed and its children take over; the children name it in ParentShardId. To read all changes of an item in order, finish the parent before its children. A shard is open while EndingSequenceNumber is null.

DynamoDB removes a shard 24 hours after it was closed. The list of shards can change between two calls of DescribeStream.

Constructors

Shard()

public Shard()

Properties

ParentShardId

Gets the identifier of the parent shard, or null for a shard without one. The parent may no longer be listed once its records have expired.

public string? ParentShardId { get; init; }

Property Value

string

SequenceNumberRange

Gets the first and last sequence number of the shard, or null if DynamoDB did not report them.

public SequenceNumberRange? SequenceNumberRange { get; init; }

Property Value

SequenceNumberRange

ShardId

Gets the identifier of the shard. DynamoDB sends it with every shard: null only if the response omits it.

public string? ShardId { get; init; }

Property Value

string

Methods

Equals(Shard?)

public bool Equals(Shard? other)

Parameters

other Shard

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Shard?, Shard?)

public static bool operator ==(Shard? left, Shard? right)

Parameters

left Shard
right Shard

Returns

bool

operator !=(Shard?, Shard?)

public static bool operator !=(Shard? left, Shard? right)

Parameters

left Shard
right Shard

Returns

bool