Class InspectableLock

java.lang.Object
java.util.concurrent.locks.ReentrantLock
com.renomad.minum.database.InspectableLock
All Implemented Interfaces:
Serializable, Lock

public class InspectableLock extends ReentrantLock
A child class which provides access to the ReentrantLock.getOwner() method, useful for logging who a thread is waiting on when multiple are contending.
See Also:
  • Constructor Details

    • InspectableLock

      public InspectableLock()
  • Method Details

    • getLockOwner

      public Thread getLockOwner()
      Provide access to the protected method, ReentrantLock.getOwner()
    • getLockOwnerIdString

      public static String getLockOwnerIdString(Thread thread)
      A helper method to get the identifier for a thread, handling null when necessary