.NET Client Documentation
5.3.0
Search Results for

    Show / Hide Table of Contents

    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<long>

    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 due to better io utilization and a reduced number of executed operations. If the batch is empty, the call is ignored. When the collection is not empty, the content is copied into a different data-structure. This means that:

    1. after this call completes, the collection can be re-used.
    2. the collection doesn't need to be serializable
    If the collection is larger than the capacity of the ringbuffer, then the items that were written first will be overwritten. Therefor this call will not block. The items are inserted in the order of the Iterator of the collection. If an addAll is executed concurrently with an Add or addAll, no guarantee is given that items are contiguous. The result of the future contains the sequenceId of the last written item
    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

    In This Article
    Back to top Copyright © 2010-2023 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.