public class RedisNotificationManager extends NotificationManager
| 构造器和说明 |
|---|
RedisNotificationManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
enableSend(boolean enable)
启用/停用通知发送,启用时send才能发送出notification,否则所有的通知都不能发送。
|
java.lang.String |
getLocalAddress()
取得当前节点的信息。
|
boolean |
isEnabled()
是否启用集群。
|
boolean |
isSendEnabled()
取得通知发送是否启用。
|
void |
register(NotificationListener listener)
注册通知监听。
|
void |
register(NotificationType type,
NotificationListener listener)
注册通知监听。
|
void |
send(Notification notification)
发送通知。
|
void |
send(Notification notification,
boolean force)
发送通知。
|
void |
send(NotificationType type,
java.lang.Object content)
发送通知。
|
void |
send(NotificationType type,
java.lang.Object content,
boolean force)
发送通知。
|
getClusterId, getClusterIndex, getInstance, hashCode, removeThreadLocal, stoppublic boolean isEnabled()
NotificationFactorytrue,否则返回false。public void send(NotificationType type, java.lang.Object content)
NotificationFactorytype - 通知类型。content - 通知传递的对象。public void send(NotificationType type, java.lang.Object content, boolean force)
NotificationFactorytype - 通知类型。content - 通知传递的对象。force - 强制发送,为true时即使是在监听器响应中调用的通知也将发出。public void send(Notification notification)
NotificationFactorynotification - 通知public void send(Notification notification, boolean force)
NotificationFactorynotification - 通知force - 强制发送,为true时即使是在监听器响应中调用的通知也将发出。public void register(NotificationType type, NotificationListener listener)
NotificationFactorytype - 通知类型。listener - 通知监听器。public void register(NotificationListener listener)
NotificationFactorylistener - 通知监听器。public java.lang.String getLocalAddress()
NotificationFactorypublic void enableSend(boolean enable)
NotificationFactoryenable - 为true时启用,否则停用。public boolean isSendEnabled()
NotificationFactory