AddAllAsync Method
AddAllAsync(ICollection<TItem>, OverflowPolicy)
Adds all the items of a collection to the tail of the Ringbuffer.
Declaration
Task<long> AddAllAsync(ICollection<TItem> items, OverflowPolicy overflowPolicy)
Parameters
ICollection<TItem> | items | the batch of items to Add. |
OverflowPolicy | overflowPolicy | overflow policy to use |
Returns
Task<Int64> | the ICompletableFuture to synchronize on completion. |
Remarks
Adds all the items of a collection to the tail of the Ringbuffer.
A addAll is likely to outperform multiple calls to
- after this call completes, the collection can be re-used.
- the collection doesn't need to be serializable
Exceptions
ArgumentNullException | if batch is null, or if an item in this batch is null or if overflowPolicy is null |
ArgumentException | if collection is empty |