ReadManyAsync Method
ReadManyAsync(long, int, int)
Reads a batch of items from the Ringbuffer.
Declaration
Task<IReadOnlyList<TItem>> ReadManyAsync(long startSequence, int minCount, int maxCount)
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. |
Returns
Task<IReadOnlyList<TItem>> | a future containing the items read. |
Remarks
Reads a batch of items from the Ringbuffer. If the number of available items after the first read item is smaller than the maxCount, these items are returned. So it could be the number of items read is smaller than the maxCount. If there are less items available than minCount, then this call blocks. Reading a batch of items is likely to perform better because less overhead is involved.
Exceptions
ArgumentException | if startSequence is smaller than 0
or if startSequence larger than
|