public class TraceLock extends ReentrantLock
| Constructor and Description |
|---|
TraceLock() |
| Modifier and Type | Method and Description |
|---|---|
static ReentrantLock |
create() |
void |
lock() |
void |
lockInterruptibly() |
String |
toString() |
boolean |
tryLock() |
boolean |
tryLock(long timeout,
TimeUnit unit) |
void |
unlock() |
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, newConditionpublic static ReentrantLock create()
public void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LocklockInterruptibly in class ReentrantLockInterruptedExceptionpublic void lock()
lock in interface Locklock in class ReentrantLockpublic String toString()
toString in class ReentrantLockpublic void unlock()
unlock in interface Lockunlock in class ReentrantLockpublic boolean tryLock()
tryLock in interface LocktryLock in class ReentrantLockpublic boolean tryLock(long timeout,
TimeUnit unit)
throws InterruptedException
tryLock in interface LocktryLock in class ReentrantLockInterruptedExceptionCopyright © 2016. All rights reserved.