StampedLock.AsReadLock Method

Definition

Returns a plain Lock view of this StampedLock in which the Lock#lock method is mapped to #readLock, and similarly for other methods.

[Android.Runtime.Register("asReadLock", "()Ljava/util/concurrent/locks/Lock;", "GetAsReadLockHandler", ApiSince=24)]
public virtual Java.Util.Concurrent.Locks.ILock? AsReadLock ();
[<Android.Runtime.Register("asReadLock", "()Ljava/util/concurrent/locks/Lock;", "GetAsReadLockHandler", ApiSince=24)>]
abstract member AsReadLock : unit -> Java.Util.Concurrent.Locks.ILock
override this.AsReadLock : unit -> Java.Util.Concurrent.Locks.ILock

Returns

the lock

Attributes

Remarks

Returns a plain Lock view of this StampedLock in which the Lock#lock method is mapped to #readLock, and similarly for other methods. The returned Lock does not support a Condition; method Lock#newCondition() throws UnsupportedOperationException.

Java documentation for java.util.concurrent.locks.StampedLock.asReadLock().

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