Skip to content

v0.2.50..v0.2.51 changeset OsmApiWriter.h

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h b/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
index cbe1337..644b934 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
@@ -130,6 +130,16 @@ public:
    * @see ProgressReporter
    */
   virtual unsigned int getNumSteps() const { return 1; }
+  /**
+   * @brief setErrorPathname Record the pathname of the error changeset
+   * @param path Pathname
+   */
+  void setErrorPathname(const QString& path) { _changeset.setErrorPathname(path); }
+  /**
+   * @brief writeErrorFile Writes our the error changeset
+   * @return true if the file was written successfully
+   */
+  bool writeErrorFile() { return _changeset.writeErrorFile(); }
 
 private:
   /**
@@ -244,7 +254,12 @@ private:
   /** Maximum number of writer threads processing changesets, loaded with 'changeset.apidb.max.writers' option */
   int _maxWriters;
   /** Soft maximum number of elements per changeset, size could be larger than the soft max in order to include
-   *  the entirety of a way or relation, loaded with 'changeset.apidb.max.size' option
+   *  the entirety of a way or relation, loaded with 'changeset.apidb.size.max' option
+   */
+  long _maxPushSize;
+  /** Maximum size of a changeset read from the API itself.  This allows for the potential of multiple
+   *  pushes per changeset to increase the speed of the upload.  That way less requests for new changeset
+   *  opens/closes are required but the pushes can be an optimal size still.
    */
   long _maxChangesetSize;
   /** Flag to turn on OSM API writer throttling */
@@ -266,6 +281,12 @@ private:
   QString _accessToken;
   /** OAuth 1.0 secret token granted through OAuth authorization */
   QString _secretToken;
+  /** Full pathname of the error file changeset, if any errors occur */
+  QString _errorPathname;
+  /** Number of changesets written to API */
+  int _changesetCount;
+  /** Mutex for changeset count */
+  std::mutex _changesetCountMutex;
   /** For white box testing */
   friend class OsmApiWriterTest;
   /** Default constructor for testing purposes only */
Clone this wiki locally