Java.Util.Concurrent.Locks.ReentrantLock: Method Members

The methods of Java.Util.Concurrent.Locks.ReentrantLock are listed below. For a list of all members, see the ReentrantLock Members list.

See Also: Inherited members from Java.Lang.Object

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.