Interface ICacheLock
Cache locking interface.
All members are thread-safe and may be used concurrently from multiple threads.
Namespace: Apache.Ignite.Core.Cache
Assembly: Apache.Ignite.Core.dll
Syntax
public interface ICacheLock : IDisposable
Methods
Enter()
Acquires an exclusive lock.
Declaration
void Enter()
Exit()
Releases an exclusive lock on the specified object.
Declaration
void Exit()
TryEnter()
Acquires an exclusive lock only if it is free at the time of invocation.
Declaration
bool TryEnter()
Returns
Type | Description |
---|---|
System.Boolean | True if the current thread acquires the lock; otherwise, false. |
TryEnter(TimeSpan)
Attempts, for the specified amount of time, to acquire an exclusive lock.
Declaration
bool TryEnter(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | A |
Returns
Type | Description |
---|---|
System.Boolean | True if the current thread acquires the lock; otherwise, false. |