Class SerReentrantReadWriteLock
java.lang.Object
com.pnfsoftware.jeb.util.serialization.objects.SerReentrantReadWriteLock
- All Implemented Interfaces:
ReadWriteLock
Wrapper for a Java
ReentrantReadWriteLock that supports serialization.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()final intintintintgetWaitQueueLength(Condition condition) intfinal booleanhasQueuedThread(Thread thread) final booleanbooleanhasWaiters(Condition condition) final booleanisFair()booleanbooleanreadLock()
-
Constructor Details
-
SerReentrantReadWriteLock
public SerReentrantReadWriteLock() -
SerReentrantReadWriteLock
public SerReentrantReadWriteLock(boolean fair)
-
-
Method Details
-
get
-
writeLock
- Specified by:
writeLockin interfaceReadWriteLock
-
readLock
- Specified by:
readLockin interfaceReadWriteLock
-
isFair
public final boolean isFair() -
getReadLockCount
public int getReadLockCount() -
isWriteLocked
public boolean isWriteLocked() -
isWriteLockedByCurrentThread
public boolean isWriteLockedByCurrentThread() -
getWriteHoldCount
public int getWriteHoldCount() -
getReadHoldCount
public int getReadHoldCount() -
hasQueuedThreads
public final boolean hasQueuedThreads() -
hasQueuedThread
-
getQueueLength
public final int getQueueLength() -
hasWaiters
-
getWaitQueueLength
-