Class 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.

    • Method Detail

      • 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)
      • disable

        public void disable​(boolean interrupt)
      • isDisabled

        public boolean isDisabled()
      • getWarnTime

        public Duration getWarnTime()
      • setWarnTime

        public void setWarnTime​(Duration warnTime)