  | ILockTryLock Method (Int64, NullableTimeUnit) | 
 Tries to acquires the lock for the specified lease time.
 
    Namespace: 
   Hazelcast.Core
    Assembly:
   Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.2
Syntaxbool TryLock(
	long time,
	Nullable<TimeUnit> unit
)
Function TryLock ( 
	time As Long,
	unit As Nullable(Of TimeUnit)
) As Boolean
bool TryLock(
	long long time, 
	Nullable<TimeUnit> unit
)
abstract TryLock : 
        time : int64 * 
        unit : Nullable<TimeUnit> -> bool 
Parameters
- time
 - Type: SystemInt64
time to wait before releasing the lock. - unit
 - Type: SystemNullableTimeUnit
unit of time to specify lease time. 
Return Value
Type: 
Boolean
Remarks
                Tries to acquires the lock for the specified lease time.
                
After lease time, lock will be released.
See Also