simonbence commented on code in PR #8152:
URL: https://github.com/apache/nifi/pull/8152#discussion_r1447185052


##########
nifi-nar-bundles/nifi-questdb-bundle/nifi-questdb/src/main/java/org/apache/nifi/questdb/DatabaseManager.java:
##########
@@ -14,25 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.controller.status.history.storage;
-
-import org.apache.nifi.controller.status.NodeStatus;
-import org.apache.nifi.controller.status.history.StatusHistory;
-
-import java.time.Instant;
+package org.apache.nifi.questdb;
 
 /**
- * Readable status storage for the node status entries.
+ * Provides access to database via distributing clients. Also responsible to 
ensure the health of the database connection
+ * and database if possible.
  */
-public interface NodeStatusStorage extends StatusStorage<NodeStatus> {
+public interface DatabaseManager {
+    /**
+     * @return A client to execute queries against the managed database 
instance.
+     */
+    Client acquireClient();
+
+    /**
+     * Starts maintenance of the database. Necessary initialization step for 
proper use.
+     */
+    void init();
 
     /**
-     * Returns with the status history of the node for the specified time 
range.
-     *
-     * @param start Start date of the history, inclusive.
-     * @param end End date of the history, inclusive.
-     *
-     * @return Status history.
+     * Finishes maintenance of the database. After calling, manager does not 
guarantee any connection with the database.
      */
-    StatusHistory read(Instant start, Instant end);
+    void close();

Review Comment:
   Yeah, that is true. I added it but kept the original method signiture 
without the exception as well. Currently we do not build on the "closability" 
and where it is considered as `DatabaseManager` we do not expect exception when 
closing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to