类的使用
com.alibaba.nacos.common.notify.Event
-
使用Event的程序包 程序包 说明 com.alibaba.nacos.common.event com.alibaba.nacos.common.notify com.alibaba.nacos.common.notify.listener -
-
com.alibaba.nacos.common.event中Event的使用
com.alibaba.nacos.common.event中Event的子类 修饰符和类型 类 说明 classServerConfigChangeEventServer configuration changed event. -
com.alibaba.nacos.common.notify中Event的使用
com.alibaba.nacos.common.notify中Event的子类 修饰符和类型 类 说明 classSlowEventThis event share one event-queue.类型参数类型为Event的com.alibaba.nacos.common.notify中的字段 修饰符和类型 字段 说明 private java.lang.Class<? extends Event>DefaultPublisher. eventTypeprivate java.util.concurrent.BlockingQueue<Event>DefaultPublisher. queue参数类型为Event的com.alibaba.nacos.common.notify中的方法 修饰符和类型 方法 说明 voidDefaultPublisher. notifySubscriber(Subscriber subscriber, Event event)voidEventPublisher. notifySubscriber(Subscriber subscriber, Event event)Notify listener.booleanDefaultPublisher. publish(Event event)booleanEventPublisher. publish(Event event)publish event.static booleanNotifyCenter. publishEvent(Event event)Request publisher publish event Publishers load lazily, calling publisher.private static booleanNotifyCenter. publishEvent(java.lang.Class<? extends Event> eventType, Event event)Request publisher publish event Publishers load lazily, calling publisher.(专用程序包) voidDefaultPublisher. receiveEvent(Event event)Receive and notifySubscriber to process the event.voidDefaultSharePublisher. receiveEvent(Event event)类型变量类型为Event的com.alibaba.nacos.common.notify中的方法参数 修饰符和类型 方法 说明 voidDefaultSharePublisher. addSubscriber(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)private static voidNotifyCenter. addSubscriber(Subscriber consumer, java.lang.Class<? extends Event> subscribeType, EventPublisherFactory factory)Add a subscriber to publisher.voidShardedEventPublisher. addSubscriber(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)Add listener for default share publisher.EventPublisherEventPublisherFactory. apply(java.lang.Class<? extends Event> eventType, java.lang.Integer maxQueueSize)Build an newEventPublisher.static voidNotifyCenter. deregisterPublisher(java.lang.Class<? extends Event> eventType)Deregister publisher.static EventPublisherNotifyCenter. getPublisher(java.lang.Class<? extends Event> topic)voidDefaultPublisher. init(java.lang.Class<? extends Event> type, int bufferSize)voidEventPublisher. init(java.lang.Class<? extends Event> type, int bufferSize)Initializes the event publisher.private static booleanNotifyCenter. publishEvent(java.lang.Class<? extends Event> eventType, Event event)Request publisher publish event Publishers load lazily, calling publisher.static EventPublisherNotifyCenter. registerToPublisher(java.lang.Class<? extends Event> eventType, int queueMaxSize)Register publisher with default factory.static voidNotifyCenter. registerToPublisher(java.lang.Class<? extends Event> eventType, EventPublisher publisher)Register publisher.static EventPublisherNotifyCenter. registerToPublisher(java.lang.Class<? extends Event> eventType, EventPublisherFactory factory, int queueMaxSize)Register publisher with specified factory.voidDefaultSharePublisher. removeSubscriber(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)private static booleanNotifyCenter. removeSubscriber(Subscriber consumer, java.lang.Class<? extends Event> subscribeType)Remove subscriber.voidShardedEventPublisher. removeSubscriber(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)Remove listener for default share publisher. -
com.alibaba.nacos.common.notify.listener中Event的使用
类型参数类型为Event的com.alibaba.nacos.common.notify.listener中的类 修饰符和类型 类 说明 classSubscriber<T extends Event>An abstract subscriber class for subscriber interface.返回变量类型为Event的类型的com.alibaba.nacos.common.notify.listener中的方法 修饰符和类型 方法 说明 java.lang.Class<? extends Event>SmartSubscriber. subscribeType()abstract java.lang.Class<? extends Event>Subscriber. subscribeType()Type of this subscriber's subscription.abstract java.util.List<java.lang.Class<? extends Event>>SmartSubscriber. subscribeTypes()Returns which event type are smartsubscriber interested in.
-