Tries to acquire the lock for the specified key.
Namespace: Hazelcast.Core
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.8.2
Syntax
Parameters
- key
- Type: TKey
the key to lock - time
- Type: SystemInt64
the maximum time to wait for the lock - timeunit
- Type: Hazelcast.CoreTimeUnit
the time unit of the time argument.
Return Value
Type: Booleantrue if the lock was acquired and false if the waiting time elapsed before the lock was acquired.
Exceptions
Exception | Condition |
---|---|
Exception |
See Also