|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.concurrent.LockManager<R>
public class LockManager<R extends Comparable<R>>
This class coordinates a schedule among concurrent operations requiring
exclusive access to shared resources. Whenever possible, the result is a
concurrent schedule - that is, operations having non-overlapping lock
requirements run concurrently while operations that have lock contentions are
queued behind operations that currently have locks on the relevant resources.
A ResourceQueue is created for each resource and used to block
operations that are awaiting a lock. When locks are not being pre-declared, a
WAITS_FOR graph is additionally used to detect deadlocks.
| Field Summary | |
|---|---|
protected boolean |
DEBUG
Deprecated. True iff the log level is DEBUG or less. |
protected boolean |
INFO
Deprecated. True iff the log level is INFO or less. |
protected static org.apache.log4j.Logger |
log
Deprecated. |
| Constructor Summary | |
|---|---|
LockManager(int maxConcurrency,
boolean predeclareLocks)
Deprecated. Create a lock manager for resources and concurrent operations. |
|
| Method Summary | |
|---|---|
CounterSet |
getCounters()
Deprecated. |
String |
toString()
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected final boolean INFO
log level is INFO or less.
protected final boolean DEBUG
log level is DEBUG or less.
| Constructor Detail |
|---|
public LockManager(int maxConcurrency,
boolean predeclareLocks)
Note that there is no concurrency limit imposed by the
LockManager when predeclareLocks is true as deadlocks are
impossible and we do not maintain a WAITS_FOR graph.
maxConcurrency - The maximum multi-programming level (ignored if
predeclareLocks is true).predeclareLocks - When true operations MUST declare all locks before they
begin to execute. This makes possible several efficiencies
and by sorting the resources in each lock request into a
common order we are able to avoid deadlocks entirely.| Method Detail |
|---|
public CounterSet getCounters()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||