Class RedisNotificationPlugin

  • All Implemented Interfaces:
    io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Plugin, NotificationPlugin

    public final class RedisNotificationPlugin
    extends Object
    implements NotificationPlugin
    Author:
    pchretien
    • Constructor Detail

      • RedisNotificationPlugin

        @Inject
        public RedisNotificationPlugin​(Optional<String> connectorNameOpt,
                                       List<io.vertigo.connectors.redis.RedisConnector> redisConnectors)
        Constructor.
        Parameters:
        redisConnector - the connector to REDIS database
        daemonManager - Daemon Manager
    • Method Detail

      • updateUserContent

        public void updateUserContent​(UID<Account> accountURI,
                                      UUID notificationUUID,
                                      String userContent)
        Specified by:
        updateUserContent in interface NotificationPlugin
        Parameters:
        accountURI - Account uri
        notificationUUID - Notification uuid
        userContent - User Content
      • remove

        public void remove​(UID<Account> accountURI,
                           UUID notificationUUID)
        Specified by:
        remove in interface NotificationPlugin
        Parameters:
        accountURI - Account uri
        notificationUUID - Notification uuid
      • removeAll

        public void removeAll​(String type,
                              String targetUrl)
        Specified by:
        removeAll in interface NotificationPlugin
        Parameters:
        type - Notification's type
        targetUrl - Target URL, use to filter all notifications to remove
      • cleanTooOldNotifications

        public void cleanTooOldNotifications()
        Scan all notifs every minutes to removed old ones.