presto-main/src/main/java/io/prestosql/execution/resourcegroups/InternalResourceGroup.java/InternalResourceGroup/getState
class InternalResourceGroup:    private ResourceGroupState getState()
    {
        synchronized (root) {
            if (canRunMore()) {
                return CAN_RUN;
            }
            else if (canQueueMore()) {
                return CAN_QUEUE;
            }
            else {
                return FULL;
            }
        }
    }