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