Table of Contents

Class ReadShardRequest

Namespace
DynaSharp.Streams
Assembly
DynaSharp.dll

Reads one shard of a stream from a position to its end, for ReadShardAsync(ReadShardRequest, CancellationToken).

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

Remarks

The position is the one of GetShardIteratorRequest: TrimHorizon for everything still kept, Latest for what is written from now on, and AfterSequenceNumber with the sequence number of the last record a reader handled, to resume where it left off.

Constructors

ReadShardRequest()

public ReadShardRequest()

Properties

EmptyPageDelay

Gets how long the reader waits after a page without records before it asks again, on TimeProvider. The default is one second: a shard allows five GetRecords calls per second, shared by all its readers, and an open shard answers an empty page as long as nothing changes.

public TimeSpan EmptyPageDelay { get; init; }

Property Value

TimeSpan

Remarks

Zero asks again at once. The delay must stay below the 15 minutes an iterator lives, or every wait would end with an expired iterator.

Limit

Gets the maximum number of records of one GetRecords call, 1 to 1,000. null sends nothing, and DynamoDB returns up to 1,000 records or 1 MB a call.

public int? Limit { get; init; }

Property Value

int?

SequenceNumber

Gets the sequence number to start at or after. Required for AtSequenceNumber and AfterSequenceNumber, and not allowed for the other types.

public string? SequenceNumber { get; init; }

Property Value

string

ShardId

Gets the identifier of the shard, from DescribeStreamAsync(DescribeStreamRequest, CancellationToken).

public required string ShardId { get; init; }

Property Value

string

ShardIteratorType

Gets where in the shard reading starts.

public required ShardIteratorType ShardIteratorType { get; init; }

Property Value

ShardIteratorType

StreamArn

Gets the ARN of the stream.

public required string StreamArn { get; init; }

Property Value

string

Methods

Equals(ReadShardRequest?)

public bool Equals(ReadShardRequest? other)

Parameters

other ReadShardRequest

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 ==(ReadShardRequest?, ReadShardRequest?)

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

Parameters

left ReadShardRequest
right ReadShardRequest

Returns

bool

operator !=(ReadShardRequest?, ReadShardRequest?)

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

Parameters

left ReadShardRequest
right ReadShardRequest

Returns

bool