コード例 #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);
 }