Class SerReentrantLock
java.lang.Object
com.pnfsoftware.jeb.util.serialization.objects.SerReentrantLock
- All Implemented Interfaces:
Lock
Wrapper for a Java
ReentrantLock that supports serialization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()intfinal intintgetWaitQueueLength(Condition condition) final booleanhasQueuedThread(Thread thread) final booleanbooleanhasWaiters(Condition condition) final booleanisFair()booleanbooleanisLocked()voidlock()voidbooleantryLock()booleanvoidunlock()
-
Constructor Details
-
SerReentrantLock
public SerReentrantLock() -
SerReentrantLock
public SerReentrantLock(boolean fair)
-
-
Method Details
-
get
-
lock
public void lock() -
unlock
public void unlock() -
isHeldByCurrentThread
public boolean isHeldByCurrentThread() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
newCondition
- Specified by:
newConditionin interfaceLock
-
getHoldCount
public int getHoldCount() -
isLocked
public boolean isLocked() -
isFair
public final boolean isFair() -
hasQueuedThreads
public final boolean hasQueuedThreads() -
hasQueuedThread
-
getQueueLength
public final int getQueueLength() -
hasWaiters
-
getWaitQueueLength
-