Java.Util.Concurrent.Locks.ReentrantLock Members

The members of Java.Util.Concurrent.Locks.ReentrantLock are listed below.

See Also: Inherited members from Java.Lang.Object

Public Constructors

Creates an instance of ReentrantLock.
Creates an instance of ReentrantLock with the given fairness policy.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
HasQueuedThreadsbool. Queries whether any threads are waiting to acquire this lock.
[read-only]
HoldCountint. Queries the number of holds on this lock by the current thread.
[read-only]
IsFairbool. Returns true if this lock has fairness set true.
[read-only]
IsHeldByCurrentThreadbool. Queries if this lock is held by the current thread.
[read-only]
IsLockedbool. Queries if this lock is held by any thread.
[read-only]
QueueLengthint. Returns an estimate of the number of threads waiting to acquire this lock.

Protected Properties

[read-only]
OwnerJava.Lang.Thread. Returns the thread that currently owns this lock, or null if not owned.
[read-only]
QueuedThreadsICollection<Java.Lang.Thread>. Returns a collection containing threads that may be waiting to acquire this lock.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GetWaitQueueLength(ICondition) : int
Returns an estimate of the number of threads waiting on the given condition associated with this lock.
HasQueuedThread(Java.Lang.Thread) : bool
Queries whether the given thread is waiting to acquire this lock.
HasWaiters(ICondition) : bool
Queries whether any threads are waiting on the given condition associated with this lock.
Lock()
Acquires the lock.
LockInterruptibly()
Acquires the lock unless the current thread is Java.Lang.Thread.Interrupt.
NewCondition() : ICondition
Returns a Java.Util.Concurrent.Locks.ICondition instance for use with this Java.Util.Concurrent.Locks.ILock instance.
TryLock() : bool
Acquires the lock only if it is not held by another thread at the time of invocation.
TryLock(long, Java.Util.Concurrent.TimeUnit) : bool
Acquires the lock if it is not held by another thread within the given waiting time and the current thread has not been Java.Lang.Thread.Interrupt.
Unlock()
Attempts to release this lock.

Protected Methods

GetWaitingThreads(ICondition) : ICollection<Java.Lang.Thread>
Returns a collection containing those threads that may be waiting on the given condition associated with this lock.