public class LockManager<R extends Comparable<R>> extends Object
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.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
LockManager(int maxConcurrency,
boolean predeclareLocks)
Deprecated.
Create a lock manager for resources and concurrent operations.
|
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.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.public CounterSet getCounters()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.