Class ObjectLocker.LockHolder<K>

java.lang.Object
nl.vpro.util.locker.ObjectLocker.LockHolder<K>
Enclosing class:
ObjectLocker

public static class ObjectLocker.LockHolder<K> extends Object
Most importantly this is a wrapper around ReentrantLock, but it stores some extra meta information, like the original key, thread, and initialization time.

It can also store the exception if that happened during the hold of the lock.

  • Field Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getAge

      public Duration getAge()
      Since:
      5.13
    • summarize

      public String summarize()
    • summarize

      public String summarize(boolean showThreadBusy)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • disable

      public void disable(boolean interrupt)
    • isDisabled

      public boolean isDisabled()
    • getWarnTime

      public Duration getWarnTime()
    • setWarnTime

      public void setWarnTime(Duration warnTime)