code: void beginPartUpload(final int nextPartNumber)
              throws SdkClientException {
          if (nextPartNumber < 1)
              throw new IllegalArgumentException("part number must be at least 1");
          if (partUploadInProgress) {
              throw new SdkClientException(
                      "Parts are required to be uploaded in series");
          }
          synchronized (this) {
              if (nextPartNumber - partNumber <= 1) {
                  partNumber = nextPartNumber;
                  partUploadInProgress = true;
              } else {
                  throw new SdkClientException(
                          "Parts are required to be uploaded in series (partNumber="
                                  + partNumber + ", nextPartNumber="
                                  + nextPartNumber + ")");
              }
          }
      }
docs: Can be used to check the next part number must either be the same (if it
  was an retry) or increment by exactly 1 during a serial part uploads.
  <p>
  As a side effect, the {@link #partUploadInProgress} will be set to true
  upon successful completion of this method. Caller of this method is
  responsible to call {@link #endPartUpload()} in a finally block once
  the respective part-upload is completed (either normally or abruptly).
  
  @see #endPartUpload()
  
  @throws SdkClientException
  if parallel part upload is detected