StampedLock.Validate(Int64) Method

Definition

Returns true if the lock has not been exclusively acquired since issuance of the given stamp.

[Android.Runtime.Register("validate", "(J)Z", "GetValidate_JHandler", ApiSince=24)]
public virtual bool Validate (long stamp);
[<Android.Runtime.Register("validate", "(J)Z", "GetValidate_JHandler", ApiSince=24)>]
abstract member Validate : int64 -> bool
override this.Validate : int64 -> bool

Parameters

stamp
Int64

a stamp

Returns

true if the lock has not been exclusively acquired since issuance of the given stamp; else false

Attributes

Remarks

Returns true if the lock has not been exclusively acquired since issuance of the given stamp. Always returns false if the stamp is zero. Always returns true if the stamp represents a currently held lock. Invoking this method with a value not obtained from #tryOptimisticRead or a locking method for this lock has no defined effect or result.

Java documentation for java.util.concurrent.locks.StampedLock.validate(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to