Object DeadlockDetection

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit detectDeadlock(ThreadId detectFor, Map<ThreadId, ThreadWaitingInfo> allWaitingAcrossAllJvms, Boolean allThreadsBailOut) Looks for a cycle of waiting threads, across all JVMs, that leads back to detectFor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • detectDeadlock

         final Unit detectDeadlock(ThreadId detectFor, Map<ThreadId, ThreadWaitingInfo> allWaitingAcrossAllJvms, Boolean allThreadsBailOut)

        Looks for a cycle of waiting threads, across all JVMs, that leads back to detectFor.

        A thread waits for the owners of the locks it needs. Because writers are preferred, a thread waiting for a read lock also waits for the threads waiting for the write lock of the same name.

        Every thread in a cycle detects it, so only one of them - the one with the greatest ThreadId.redisKey - gives up, and the others keep waiting for its locks. If allThreadsBailOut is set, every thread in the cycle gives up.