code: void checkState() throws IOException {
      int majority = getMajoritySize();
      int numDisabled = 0;
      for (HttpImageUploadChannel ch : uploadChannels) {
        numDisabled += ch.isDisabled() ? 1 : 0;
      }
      if (numDisabled >= majority) {
        Map<HttpImageUploadChannel, Void> successes 
          = new HashMap<HttpImageUploadChannel, Void>();
        Map<HttpImageUploadChannel, Throwable> exceptions 
          = new HashMap<HttpImageUploadChannel, Throwable>();
        for (HttpImageUploadChannel ch : uploadChannels) {
          if (ch.isDisabled()) {
            exceptions.put(ch, ch.getErrorStatus());
          } else {
            successes.put(ch, null);
          }
        }
        throw QuorumException.create("Failed when uploading", successes,
            exceptions);
      }
    }
docs: At each operation, this function is used to ensure that we still have a
  majority of successful channels to which we can write.