.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    TryRemoveAsync Method

    TryRemoveAsync(TKey, TimeSpan)

    Tries to remove the entry with the given key from this map within the specified time to wait value.

    Declaration
    Task<bool> TryRemoveAsync(TKey key, TimeSpan timeToWait = default(TimeSpan))
    Parameters
    TKey key

    A key.

    TimeSpan timeToWait

    How long to wait for a lock on the key (-1ms to wait forever; 0ms to not wait at all).

    Returns
    Task<Boolean>

    true if the entry was removed; otherwise false.

    Remarks

    If the key is already locked by another thread and/or member, then this operation will wait for the timeToWait for acquiring the lock. If the key is still locked, this operation returns false. If timeToWait is -1ms, waits forever. If it is 0ms, does not wait at all.

    The operation also returns false when no entry with the specified key exists.

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