diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2013-08-27 10:30:55 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2013-08-27 10:30:55 +0200 |
commit | 08a18e07cc842e111f834a395da414fd516606ee (patch) | |
tree | 39e70c62837af8bb562242a413399109e52ed486 /sonar-plugin-api/src | |
parent | 8d4325511265cae0947a763cf559b2514052e4b7 (diff) | |
download | sonarqube-08a18e07cc842e111f834a395da414fd516606ee.tar.gz sonarqube-08a18e07cc842e111f834a395da414fd516606ee.zip |
SONAR-4524 Create notifications using batch insert
to improve performances
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/notifications/NotificationManager.java | 20 |
1 files changed, 15 insertions, 5 deletions
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; + /** * <p> * The notification manager receives notifications and is in charge of storing them so that they are processed by the notification service. * </p> * <p> - * 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. * </p> - * + * * @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<Notification> notifications); + + /** * <p> - * 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. * </p> * <p> * The resource ID can be null in case of notifications that have nothing to do with a specific project (like system notifications). * </p> - * + * * @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 |