code: private void _updateStatus() {
          boolean doneWithoutErrors = true;
          boolean doneWithErrors = true;
          boolean finishedOne = false;
          if (_status == Status.DONE || _status == Status.ERROR) {
              return;
          }
          for (AsyncBatchedMetricQuery query: _queries) {
              Status status = query.getStatus();
              if (status == Status.PROCESSING) {
                  _status = Status.PROCESSING;
                  return;
              }
              boolean queryFinished = (status == Status.DONE || status == Status.ERROR);
              if (queryFinished) {
                  finishedOne = true;
              }
              doneWithErrors &= queryFinished;
              doneWithoutErrors &= (status == Status.DONE);
          }
          if (!doneWithoutErrors && doneWithErrors) {
              _status = Status.ERROR;
          } else if (doneWithoutErrors) {
              _status = Status.DONE;
          } else if (finishedOne) {
              _status = Status.PROCESSING;
          } else {
              _status = Status.QUEUED;
          }
      }
docs: ~ Methods **************************************************************************************************************************************