void registerQuery(final UserRef userRef,
                       final String queryId,
                       final TaskId taskId) {

        Objects.requireNonNull(userRef);
        Objects.requireNonNull(queryId);
        Objects.requireNonNull(taskId);

        TaskId previousTaskId = userQueryToTaskMap.putIfAbsent(new Key(userRef, queryId), taskId);

        if (previousTaskId != null) {
            LOGGER.debug("Query {} already registered for user {}", queryId, userRef);
        } else {
            // In case the query finishes very quickly
            LOGGER.debug("Registering taskId {}, queryId {}, userId {}", taskId, queryId, userRef);
        }
    }
Registers a query as in progress and holds its taskid
stroom-meta/stroom-meta-impl/src/main/java/stroom/meta/impl/UserQueryRegistry.java