presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java/QueryStateMachine/addStateChangeListener
class QueryStateMachine:    public void addStateChangeListener(StateChangeListener<QueryState> stateChangeListener)
    {
        queryState.addStateChangeListener(stateChangeListener);
    }