| 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
)
Sub Lock (
leaseTime As Long,
timeUnit As Nullable(Of TimeUnit)
)
void Lock(
long long leaseTime,
Nullable<TimeUnit> timeUnit
)
abstract Lock :
leaseTime : int64 *
timeUnit : Nullable<TimeUnit> -> unit
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