예제 #1
0
 public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException {
   return sync.tryAcquireNanos(1, unit.toNanos(timeout));
 }
예제 #2
0
 public Thread getLockOwner() {
   return sync.getLockOwner();
 }
예제 #3
0
 public boolean hasQueuedThreads() {
   return sync.hasQueuedThreads();
 }
예제 #4
0
 public void lockInterruptibly() throws InterruptedException {
   sync.acquireInterruptibly(1);
 }
예제 #5
0
 public boolean isLocked() {
   return sync.isHeldExclusively();
 }
예제 #6
0
 public Condition newCondition() {
   return sync.newCondition();
 }
예제 #7
0
 public void unlock() {
   sync.release(1);
 }
예제 #8
0
 public boolean tryLock() {
   return sync.tryAcquire(1);
 }
예제 #9
0
 public void lock() {
   sync.acquire(1);
 }