code: private void removeStaleEntries() {
          FileLockReference ref;
          while ((ref = (FileLockReference)queue.poll()) != null) {
              FileKey fk = ref.fileKey();
              List<FileLockReference> list = lockMap.get(fk);
              if (list != null) {
                  synchronized (list) {
                      list.remove(ref);
                      removeKeyIfEmpty(fk, list);
                  }
              }
          }
      }
docs: Process the reference queue