Click or drag to resize

ILockLock Method (Int64, NullableTimeUnit)

Acquires the lock for the specified lease time.

Namespace:  Hazelcast.Core
Assembly:  Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.11
Syntax
void Lock(
	long leaseTime,
	Nullable<TimeUnit> timeUnit
)

Parameters

leaseTime
Type: SystemInt64
time to wait before releasing the lock.
timeUnit
Type: SystemNullableTimeUnit
unit of time to specify lease time.
Remarks
Acquires the lock for the specified lease time.

After lease time, lock will be released.

If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.

See Also