ReadManyAsync Method
ReadManyAsync(Int64, Int32, Int32)
Reads a batch of items from the Ringbuffer.
Declaration
Task<IReadOnlyList<TItem>> ReadManyAsync(long startSequence, int minCount, int maxCount)
Parameters
Int64 | startSequence | the startSequence of the first item to read. |
Int32 | minCount | the minimum number of items to read. |
Int32 | 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
|