.NET Client Documentation
5.2.2
Search Results for

    Show / Hide Table of Contents

    IFencedLock Interface

    Namespace: Hazelcast.CP
    Assembly: Hazelcast.Net.dll

    Represents a linearizable, distributed, reentrant implementation of the Java Lock.

    public interface IFencedLock : ICPDistributedObject, IDistributedObject, IAsyncDisposable
    Inherited Members
    ICPDistributedObject.GroupId
    IDistributedObject.ServiceName
    IDistributedObject.Name
    IDistributedObject.PartitionKey
    IDistributedObject.DestroyAsync()
    IAsyncDisposable.DisposeAsync()
    Remarks

    The IFencedLock is CP with respect to the CAP principle. It works on top of the Raft consensus algorithm. It offers linearizability during crash-stop failures and network partitions. If a network partition occurs, it remains available on at most one side of the partition.

    A IFencedLock works within the context of a LockContext.

    Properties

    Name Description
    InvalidFence

    Gets the identifier representing an invalid fence.

    Methods

    Name Description
    GetFenceAsync(LockContext)

    Gets the fencing token, if the lock is held by the specified lockContext context.

    GetLockCountAsync(LockContext)

    Gets the reentrant lock count of the lock, for whichever context is locking it.

    IsLockedAsync(LockContext)

    Determines whether this lock is held by any context or not.

    IsLockedByContextAsync(LockContext)

    Determines whether the lock is held by the specified lockContext context or not.

    LockAndGetFenceAsync(LockContext)

    Acquires the lock and returns the fencing token assigned to the specified lockContext context for this lock acquisition.

    LockAsync(LockContext)

    Acquires the lock for the specified lockContext context.

    TryLockAndGetFenceAsync(LockContext)

    Tries to acquire the lock and return the fencing token assigned to the specified lockContext context for this lock acquisition.

    TryLockAndGetFenceAsync(LockContext, TimeSpan)

    Tries to acquire the lock and return the fencing token assigned to the specified lockContext context for this lock acquisition.

    TryLockAsync(LockContext)

    Tries to acquire the lock for the specified lockContext context.

    TryLockAsync(LockContext, TimeSpan)

    Tries to acquire the lock for the specified lockContext context.

    UnlockAsync(LockContext)

    Releases the lock if the lock is currently held by the specified lockContext context.

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