From 08a18e07cc842e111f834a395da414fd516606ee Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 27 Aug 2013 10:30:55 +0200 Subject: SONAR-4524 Create notifications using batch insert to improve performances --- .../sonar/api/notifications/NotificationManager.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'sonar-plugin-api/src') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/NotificationManager.java b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/NotificationManager.java index 1200efbaf8a..3f9e24a9906 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/NotificationManager.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/NotificationManager.java @@ -25,35 +25,45 @@ import org.sonar.api.ServerComponent; import javax.annotation.Nullable; +import java.util.List; + /** *

* The notification manager receives notifications and is in charge of storing them so that they are processed by the notification service. *

*

- * Pico provides an instance of this class, and plugins just need to create notifications and pass them to this manager with + * Pico provides an instance of this class, and plugins just need to create notifications and pass them to this manager with * the {@link NotificationManager#scheduleForSending(Notification)} method. *

- * + * * @since 2.10 */ public interface NotificationManager extends ServerComponent, BatchComponent { /** * Receives a notification and stores it so that it is processed by the notification service. - * + * * @param notification the notification. */ void scheduleForSending(Notification notification); + /** + * Receives notifications and stores them so that they are processed by the notification service. + * + * @param notifications the notifications. + * @since 4.0 + */ + void scheduleForSending(List notifications); + /** *

- * Returns the list of users who subscribed to the given dispatcher, along with the notification channels (email, twitter, ...) that they choose + * Returns the list of users who subscribed to the given dispatcher, along with the notification channels (email, twitter, ...) that they choose * for this dispatcher. *

*

* The resource ID can be null in case of notifications that have nothing to do with a specific project (like system notifications). *

- * + * * @param dispatcher the dispatcher for which this list of users is requested * @param resourceId the optional resource which is concerned by this request * @return the list of user login along with the subscribed channels -- cgit v1.2.3