org.compass.core.util.backport.java.util.concurrent.locks
Class ReentrantLock.NonfairSync

java.lang.Object
  extended by org.compass.core.util.backport.java.util.concurrent.locks.ReentrantLock.Sync
      extended by org.compass.core.util.backport.java.util.concurrent.locks.ReentrantLock.NonfairSync
All Implemented Interfaces:
Serializable
Enclosing class:
ReentrantLock

static final class ReentrantLock.NonfairSync
extends ReentrantLock.Sync

Sync object for non-fair locks


Field Summary
 
Fields inherited from class org.compass.core.util.backport.java.util.concurrent.locks.ReentrantLock.Sync
holds_, owner_
 
Constructor Summary
ReentrantLock.NonfairSync()
           
 
Method Summary
 boolean isFair()
           
 void lock()
          Performs lock.
 void lockInterruptibly()
           
 boolean tryLock(long nanos)
           
 void unlock()
           
 
Methods inherited from class org.compass.core.util.backport.java.util.concurrent.locks.ReentrantLock.Sync
getHoldCount, getOwner, getQueuedThreads, getQueueLength, hasQueuedThreads, incHolds, isHeldByCurrentThread, isLocked, isQueued, tryLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReentrantLock.NonfairSync

ReentrantLock.NonfairSync()
Method Detail

lock

public void lock()
Performs lock. Try immediate barge, backing up to normal acquire on failure.

Specified by:
lock in class ReentrantLock.Sync

lockInterruptibly

public void lockInterruptibly()
                       throws InterruptedException
Specified by:
lockInterruptibly in class ReentrantLock.Sync
Throws:
InterruptedException

tryLock

public boolean tryLock(long nanos)
                throws InterruptedException
Specified by:
tryLock in class ReentrantLock.Sync
Throws:
InterruptedException

unlock

public void unlock()
Specified by:
unlock in class ReentrantLock.Sync

isFair

public final boolean isFair()
Specified by:
isFair in class ReentrantLock.Sync


Copyright (c) 2004-2006 The Compass Project.