public final class RedisNotificationPlugin extends Object implements NotificationPlugin
| Constructor and Description |
|---|
RedisNotificationPlugin(io.vertigo.commons.impl.connectors.redis.RedisConnector redisConnector,
io.vertigo.commons.daemon.DaemonManager daemonManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanTooOldNotifications()
Scan all notifs every minutes to removed old ones.
|
List<Notification> |
getCurrentNotifications(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI) |
void |
remove(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI,
UUID notificationUUID) |
void |
removeAll(String type,
String targetUrl) |
void |
send(NotificationEvent notificationEvent) |
void |
updateUserContent(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI,
UUID notificationUUID,
String userContent) |
@Inject
public RedisNotificationPlugin(io.vertigo.commons.impl.connectors.redis.RedisConnector redisConnector,
io.vertigo.commons.daemon.DaemonManager daemonManager)
redisConnector - the connector to REDIS databasedaemonManager - Daemon Managerpublic void send(NotificationEvent notificationEvent)
send in interface NotificationPluginnotificationEvent - Notification to sendpublic List<Notification> getCurrentNotifications(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI)
getCurrentNotifications in interface NotificationPluginaccountURI - Accout uripublic void updateUserContent(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI,
UUID notificationUUID,
String userContent)
updateUserContent in interface NotificationPluginaccountURI - Account urinotificationUUID - Notification uuiduserContent - User Contentpublic void remove(io.vertigo.dynamo.domain.model.UID<io.vertigo.account.account.Account> accountURI,
UUID notificationUUID)
remove in interface NotificationPluginaccountURI - Account urinotificationUUID - Notification uuidpublic void removeAll(String type, String targetUrl)
removeAll in interface NotificationPlugintype - Notification's typetargetUrl - Target URL, use to filter all notifications to removepublic void cleanTooOldNotifications()
Copyright © 2019. All Rights Reserved.