.NET Client Documentation
5.5.0
Search Results for

    Show / Hide Table of Contents

    CompareAndSetAsync Method

    CompareAndSetAsync(TKey, TValue, TValue)

    Atomically compares serialized forms of existing value with expectedValue, and sets the newValue if existing and expected values are equal.

    Declaration
    Task<bool> CompareAndSetAsync(TKey key, TValue expectedValue, TValue newValue)
    Parameters
    TKey key

    Key of the entry.

    TValue expectedValue

    Expected value map to key.

    TValue newValue

    newValue to be set if existing value and expectedValue are equal.

    Returns
    Task<bool>

    true if comparision and set operations are successful; otherwise false.

    In this article
    Back to top Copyright © 2010-2024 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.