This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-api.git


The following commit(s) were added to refs/heads/main by this push:
     new 47a95ea  NIFI-14996 Added Clear Component methods to Bulletin 
Repository (#23)
47a95ea is described below

commit 47a95ea973a92a73dea76edca2071758cef21777
Author: Matt Gilman <[email protected]>
AuthorDate: Wed Oct 8 10:13:09 2025 -0400

    NIFI-14996 Added Clear Component methods to Bulletin Repository (#23)
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../apache/nifi/reporting/BulletinRepository.java  | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/main/java/org/apache/nifi/reporting/BulletinRepository.java 
b/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
index 1bf5768..f41c1cf 100644
--- a/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
+++ b/src/main/java/org/apache/nifi/reporting/BulletinRepository.java
@@ -16,6 +16,8 @@
  */
 package org.apache.nifi.reporting;
 
+import java.time.Instant;
+import java.util.Collection;
 import java.util.List;
 
 /**
@@ -106,4 +108,24 @@ public interface BulletinRepository {
      * @return the max ID of any bulletin that has been added, or -1 if no 
bulletins have been added
      */
     long getMaxBulletinId();
+
+    /**
+     * Clears bulletins for the specified component that were created on or 
before the given timestamp.
+     *
+     * @param sourceId the ID of the source component whose bulletins should 
be cleared
+     * @param fromTimestamp the timestamp from which bulletins should be 
cleared (inclusive)
+     * @return the number of bulletins that were cleared
+     * @throws IllegalArgumentException if the sourceId is null or empty or if 
fromTimestamp is null
+     */
+    int clearBulletinsForComponent(String sourceId, Instant fromTimestamp) 
throws IllegalArgumentException;
+
+    /**
+     * Clears bulletins for the specified components that were created on or 
before the given timestamp.
+     *
+     * @param sourceIds the collection of source component IDs whose bulletins 
should be cleared
+     * @param fromTimestamp the timestamp from which bulletins should be 
cleared (inclusive)
+     * @return the total number of bulletins that were cleared across all 
specified components
+     * @throws IllegalArgumentException if sourceIds is null or empty or if 
fromTimestamp is null
+     */
+    int clearBulletinsForComponents(Collection<String> sourceIds, Instant 
fromTimestamp) throws IllegalArgumentException;
 }

Reply via email to