IMultiMapK, VTryLock Method (K, Int64, TimeUnit)Hazelcast .Net Client Class Library
Tries to acquire the lock for the specified key.

Namespace: Hazelcast.Core
Assembly: HazelcastClient3x (in HazelcastClient3x.dll) Version: 3.3.0.9
Syntax

bool TryLock(
	K key,
	long time,
	TimeUnit timeunit
)

Parameters

key
Type: K
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: Boolean
true if the lock was acquired and false if the waiting time elapsed before the lock was acquired.
Exceptions

ExceptionCondition
Exception
See Also

Reference