presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java/SqlQueryManager/addStateChangeListener
class SqlQueryManager:    @Override
    public void addStateChangeListener(QueryId queryId, StateChangeListener<QueryState> listener)
    {
        requireNonNull(listener, "listener is null");

        queryTracker.getQuery(queryId).addStateChangeListener(listener);
    }