/**
     * Marks key as unlocked.
     *
     * @param key Key.
     * @return {@code True} if last locked key was unlocked.
     */
    boolean unlocked(Object key) {
      locked.remove(key);

      return locked.isEmpty();
    }