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