|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.concurrent.Semaphore
org.jboss.cache.lock.SemaphoreLock
public class SemaphoreLock
Implements most of the methods of Lock using the Semaphore
implementation.
Constructor Summary | |
---|---|
SemaphoreLock(int permits)
|
Method Summary | |
---|---|
void |
lock()
|
void |
lockInterruptibly()
|
java.util.concurrent.locks.Condition |
newCondition()
|
boolean |
tryLock()
|
boolean |
tryLock(long arg0,
java.util.concurrent.TimeUnit arg1)
|
void |
unlock()
|
Methods inherited from class java.util.concurrent.Semaphore |
---|
acquire, acquire, acquireUninterruptibly, acquireUninterruptibly, availablePermits, drainPermits, getQueuedThreads, getQueueLength, hasQueuedThreads, isFair, reducePermits, release, release, toString, tryAcquire, tryAcquire, tryAcquire, tryAcquire |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SemaphoreLock(int permits)
Method Detail |
---|
public void lock()
lock
in interface java.util.concurrent.locks.Lock
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public java.util.concurrent.locks.Condition newCondition()
newCondition
in interface java.util.concurrent.locks.Lock
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
public boolean tryLock(long arg0, java.util.concurrent.TimeUnit arg1) throws java.lang.InterruptedException
tryLock
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |