|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.concurrent.locks.ReentrantLock
atavism.server.util.DLock
public class DLock
detection or debug lock
Method Summary | |
---|---|
static java.util.Set<java.util.List<DLock>> |
detectCycle()
goes through the lock ordering map and looks for any cycles returns a set of cycles |
protected static java.util.Set<java.util.List<DLock>> |
detectCycleHelper(DLock node,
java.util.List<DLock> history,
java.util.HashSet<DLock> cycleNodes)
|
protected static java.util.Set<DLock> |
getChildNodes()
|
java.lang.String |
getLockName()
|
protected static java.util.Set<DLock> |
getTopNodes(java.util.Set<DLock> childNodes)
|
protected static boolean |
isSubset(java.util.List<DLock> subset,
java.util.List<DLock> superset)
|
protected static boolean |
isSubset(java.util.List<DLock> set,
java.util.Set<java.util.List<DLock>> allSets)
|
void |
lock()
|
void |
lock(boolean acquireLock)
|
void |
lockInterruptibly()
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
makeStackDumpString(java.lang.StackTraceElement[] stackArray)
turn the stacktrace dump into a string |
java.util.concurrent.locks.Condition |
newCondition()
|
protected static void |
printCycle(java.util.List<DLock> cycle)
|
void |
setName(java.lang.String name)
|
protected static void |
stackDump(java.util.List<DLock> nodes)
given the sequence of nodes which led to a cycle, this method will print out the stack dumps for each lock sequence assumes we have synchronized the DLock.class object |
java.lang.String |
toString()
|
boolean |
tryLock()
|
boolean |
tryLock(long time,
java.util.concurrent.TimeUnit unit)
|
void |
unlock()
|
Methods inherited from class java.util.concurrent.locks.ReentrantLock |
---|
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String toString()
toString
in class java.util.concurrent.locks.ReentrantLock
public void setName(java.lang.String name)
public java.lang.String getLockName()
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
tryLock
in class java.util.concurrent.locks.ReentrantLock
public boolean tryLock(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
in interface java.util.concurrent.locks.Lock
tryLock
in class java.util.concurrent.locks.ReentrantLock
java.lang.InterruptedException
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
in interface java.util.concurrent.locks.Lock
lockInterruptibly
in class java.util.concurrent.locks.ReentrantLock
java.lang.InterruptedException
public java.util.concurrent.locks.Condition newCondition()
newCondition
in interface java.util.concurrent.locks.Lock
newCondition
in class java.util.concurrent.locks.ReentrantLock
public void lock()
lock
in interface java.util.concurrent.locks.Lock
lock
in class java.util.concurrent.locks.ReentrantLock
public void lock(boolean acquireLock)
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
unlock
in class java.util.concurrent.locks.ReentrantLock
public static java.util.Set<java.util.List<DLock>> detectCycle()
protected static boolean isSubset(java.util.List<DLock> set, java.util.Set<java.util.List<DLock>> allSets)
protected static boolean isSubset(java.util.List<DLock> subset, java.util.List<DLock> superset)
protected static java.util.Set<DLock> getChildNodes()
protected static java.util.Set<DLock> getTopNodes(java.util.Set<DLock> childNodes)
protected static java.util.Set<java.util.List<DLock>> detectCycleHelper(DLock node, java.util.List<DLock> history, java.util.HashSet<DLock> cycleNodes)
protected static void stackDump(java.util.List<DLock> nodes)
protected static void printCycle(java.util.List<DLock> cycle)
public static java.lang.String makeStackDumpString(java.lang.StackTraceElement[] stackArray)
public static void main(java.lang.String[] args)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |