void reportNewStoppedRecording(RecordedLockAttempts recording) {
        synchronized (interestingRecordings) {
            if (interestingRecordings.size() < MAX_RECORDINGS) {
                interestingRecordings.add(recording);
            } else if (recording.duration().compareTo(interestingRecordings.peek().duration()) > 0) {
                // peek() retrieves the smallest element according to the PriorityQueue's
                // comparator.

                interestingRecordings.poll();
                interestingRecordings.add(recording);
            }
        }

    }
Returns the ThreadLockStats holding the lock on the path, but the info may be outdated already
on return, either no-one holds the lock or another thread may hold the lock.
zkfacade/src/main/java/com/yahoo/vespa/curator/stats/LockStats.java