类 TraceEventPublisher

    • 嵌套类概要

      • 从类继承的嵌套类/接口 java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void addSubscriber​(Subscriber subscriber)
      Add listener.
      void addSubscriber​(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)
      Add listener for default share publisher.
      (专用程序包) void checkIsStart()  
      long currentEventSize()
      The number of currently staged events.
      java.lang.String getStatus()  
      private void handleEvent​(Event event)  
      private void handleEvents()  
      void init​(java.lang.Class<? extends Event> type, int bufferSize)
      Initializes the event publisher.
      void notifySubscriber​(Subscriber subscriber, Event event)
      Notify listener.
      boolean publish​(Event event)
      publish event.
      void removeSubscriber​(Subscriber subscriber)
      Remove listener.
      void removeSubscriber​(Subscriber subscriber, java.lang.Class<? extends Event> subscribeType)
      Remove listener for default share publisher.
      void run()  
      void shutdown()
      Shutdown the Resources, such as Thread Pool.
      private void waitSubscriberForInit()  
      • 从类继承的方法 java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • 从类继承的方法 java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 字段详细资料

      • THREAD_NAME

        private static final java.lang.String THREAD_NAME
        另请参阅:
        常量字段值
      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • DEFAULT_WAIT_TIME

        private static final int DEFAULT_WAIT_TIME
        另请参阅:
        常量字段值
      • subscribes

        private final java.util.Map<java.lang.Class<? extends Event>,​java.util.Set<Subscriber<? extends Event>>> subscribes
      • initialized

        private volatile boolean initialized
      • shutdown

        private volatile boolean shutdown
      • queueMaxSize

        private int queueMaxSize
      • queue

        private java.util.concurrent.BlockingQueue<Event> queue
      • publisherName

        private java.lang.String publisherName
    • 构造器详细资料

      • TraceEventPublisher

        public TraceEventPublisher()
    • 方法详细资料

      • init

        public void init​(java.lang.Class<? extends Event> type,
                         int bufferSize)
        从接口复制的说明: EventPublisher
        Initializes the event publisher.
        指定者:
        init 在接口中 EventPublisher
        参数:
        type - >
        bufferSize - Message staging queue size
      • shutdown

        public void shutdown()
                      throws com.alibaba.nacos.api.exception.NacosException
        从接口复制的说明: Closeable
        Shutdown the Resources, such as Thread Pool.
        指定者:
        shutdown 在接口中 Closeable
        抛出:
        com.alibaba.nacos.api.exception.NacosException - exception.
      • run

        public void run()
        指定者:
        run 在接口中 java.lang.Runnable
        覆盖:
        run 在类中 java.lang.Thread
      • waitSubscriberForInit

        private void waitSubscriberForInit()
      • handleEvents

        private void handleEvents()
      • handleEvent

        private void handleEvent​(Event event)
      • checkIsStart

        void checkIsStart()
      • getStatus

        public java.lang.String getStatus()