@@ -112,20 +112,30 @@ public interface BulletinRepository {
112112 /**
113113 * Clears bulletins for the specified component that were created on or before the given timestamp.
114114 *
115+ * @since 2.4.0
116+ *
115117 * @param sourceId the ID of the source component whose bulletins should be cleared
116118 * @param fromTimestamp the timestamp from which bulletins should be cleared (inclusive)
117119 * @return the number of bulletins that were cleared
118120 * @throws IllegalArgumentException if the sourceId is null or empty or if fromTimestamp is null
121+ * @throws UnsupportedOperationException Thrown in the default implementation when clearing Bulletins is not implemented
119122 */
120- int clearBulletinsForComponent (String sourceId , Instant fromTimestamp ) throws IllegalArgumentException ;
123+ default int clearBulletinsForComponent (String sourceId , Instant fromTimestamp ) throws IllegalArgumentException {
124+ throw new UnsupportedOperationException ("Clear Bulletins for Component not supported" );
125+ }
121126
122127 /**
123128 * Clears bulletins for the specified components that were created on or before the given timestamp.
124129 *
130+ * @since 2.4.0
131+ *
125132 * @param sourceIds the collection of source component IDs whose bulletins should be cleared
126133 * @param fromTimestamp the timestamp from which bulletins should be cleared (inclusive)
127134 * @return the total number of bulletins that were cleared across all specified components
128135 * @throws IllegalArgumentException if sourceIds is null or empty or if fromTimestamp is null
136+ * @throws UnsupportedOperationException Thrown in the default implementation when clearing Bulletins is not implemented
129137 */
130- int clearBulletinsForComponents (Collection <String > sourceIds , Instant fromTimestamp ) throws IllegalArgumentException ;
138+ default int clearBulletinsForComponents (Collection <String > sourceIds , Instant fromTimestamp ) throws IllegalArgumentException {
139+ throw new UnsupportedOperationException ("Clear Bulletins for Components not supported" );
140+ }
131141}
0 commit comments