ReadManyWithResultSetAsync Method
ReadManyWithResultSetAsync(long, int, int, CancellationToken)
Reads a batch of items from the Ringbuffer with sequence information.
Declaration
Task<IRingBufferResultSet<TItem>> ReadManyWithResultSetAsync(long startSequence, int minCount, int maxCount, CancellationToken cancellationToken = default)
Parameters
long | startSequence | the startSequence of the first item to read. |
int | minCount | the minimum number of items to read. |
int | maxCount | the maximum number of items to read. |
CancellationToken | cancellationToken |
Returns
Task<IRingBufferResultSet<TItem>> | a future containing the items read. |
Remarks
IRingBufferResultSet<T> provides information about sequence of the items on top of ReadManyAsync(long, int, int). NOTE: If number of items available is less than minCount, this call blocks.
Exceptions
ArgumentException | if startSequence is smaller than 0 or if startSequence larger than TailSequence() or if minCount smaller than 0 or if minCount larger than maxCount, or if maxCount larger than the capacity of the ringbuffer or if maxCount larger than 1000 (to prevent overload) |