Disruptor技術調研之EventHandler

com.lmax.disruptor.EventHandler<T> Callback interface to be implemented for processing events as they become available in the RingBuffer 用於提供對RingBuffer中當事件可用時的接口 Type Parameters: <T> event implementation storing the data for sharing during exchange or parallel coordination of an event. 事件數據 See Also: if you want to handle exceptions propagated out of the handler. 若是須要將handler中出現的異常傳播出去,可經過以下設置:--->> void com.lmax.disruptor.BatchEventProcessor.setExceptionHandler(ExceptionHandler<? super T> exceptionHandler) Set a new ExceptionHandler for handling exceptions propagated out of the BatchEventProcessor Parameters: exceptionHandler to replace the existing exceptionHandler. 設置的exceptionHandler,接口定義以下:--->> com.lmax.disruptor.ExceptionHandler<T> Callback handler for uncaught exceptions in the event processing cycle of the BatchEventProcessor 在BatchEventProcessor的事件處理循環中定義對未捕獲異常的處理接口
相關文章
相關標籤/搜索