Top Description Fields Constructors Methods
com.mchange.v2.lock

public Class SimpleSharedUseExclusiveUseLock

extends Object
implements SharedUseExclusiveUseLock
Class Inheritance
All Implemented Interfaces
com.mchange.v2.lock.SharedUseExclusiveUseLock

NONREENTRANT!!! also... would be more efficient if we segregated readers and writers into separate wait sets.

Field Summary

Modifier and TypeField and Description
private int
private int
private int
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized void
private boolean
private boolean
public synchronized void
public synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

active_readersback to summary
private int active_readers
waiting_readersback to summary
private int waiting_readers
waiting_writersback to summary
private int waiting_writers
writer_activeback to summary
private boolean writer_active

Constructor Detail

SimpleSharedUseExclusiveUseLockback to summary
public SimpleSharedUseExclusiveUseLock()

Method Detail

acquireExclusiveback to summary
public synchronized void acquireExclusive() throws InterruptedException

Implements com.mchange.v2.lock.SharedUseExclusiveUseLock.acquireExclusive.

acquireSharedback to summary
public synchronized void acquireShared() throws InterruptedException

Implements com.mchange.v2.lock.SharedUseExclusiveUseLock.acquireShared.

okayToReadback to summary
private boolean okayToRead()
okayToWriteback to summary
private boolean okayToWrite()
relinquishExclusiveback to summary
public synchronized void relinquishExclusive()

Implements com.mchange.v2.lock.SharedUseExclusiveUseLock.relinquishExclusive.

relinquishSharedback to summary
public synchronized void relinquishShared()

Implements com.mchange.v2.lock.SharedUseExclusiveUseLock.relinquishShared.